import { debounce } from 'lodash';
import { uploadCompose } from '../../actions/compose';
import { refreshHomeTimeline } from '../../actions/timelines';
-import { refreshNotifications } from '../../actions/notifications';
import { WrappedSwitch, WrappedRoute } from './util/react_router_helpers';
import UploadArea from './components/upload_area';
-import { store } from '../../containers/mastodon';
import ColumnsAreaContainer from './containers/columns_area_container';
import {
Compose,
Reblogs,
Favourites,
HashtagTimeline,
- Notifications as AsyncNotifications,
+ Notifications,
FollowRequests,
GenericNotFound,
FavouritedStatuses,
Mutes,
} from './util/async-components';
-const Notifications = () => AsyncNotifications().then(component => {
- store.dispatch(refreshNotifications());
- return component;
-});
-
// Dummy import, to make sure that <Status /> ends up in the application bundle.
// Without this it ends up in ~8 very commonly used bundles.
import '../../components/status';
import { store } from '../../../containers/mastodon';
+import { refreshNotifications } from '../../../actions/notifications';
import { injectAsyncReducer } from '../../../store/configureStore';
// NOTE: When lazy-loading reducers, make sure to add them
]).then(([component, notificationsReducer]) => {
injectAsyncReducer(store, 'notifications', notificationsReducer.default);
+ store.dispatch(refreshNotifications());
+
return component;
});
}