INNER CODE UNIT · JavaScript
HashtagPage
misa-j/social-network · client/src/App.js:21
const HashtagPage = lazy(() => import("./HashtagPage/HashtagPage"));
const LocationPage = lazy(() => import("./LocationPage/LocationPage"));
const MessengerPage = lazy(() => import("./MessengerPage/MessengerPage"));
const Navbar = lazy(() => import("./components/Navbar"));
class App extends React.Component {
componentDidMount() {
const { dispatch } = this.props;
window.addEventListener("scroll", this.handleNotificationPopupClose);
history.listen((location, action) => {
// clear alert on location change
dispatch(alertActions.clear());
});
}
handleNotificationPopupClose = () => {
const { dispatch, isOpen } = this.props;
if (isOpen) {