diff --git a/app/soapbox/containers/soapbox.js b/app/soapbox/containers/soapbox.js index a2fcda9b6..b948811d3 100644 --- a/app/soapbox/containers/soapbox.js +++ b/app/soapbox/containers/soapbox.js @@ -14,6 +14,8 @@ import { ScrollContext } from 'react-router-scroll-4'; import UI from '../features/ui'; // import Introduction from '../features/introduction'; import { fetchCustomEmojis } from '../actions/custom_emojis'; +import { hydrateStore } from '../actions/store'; +import initialState from '../initial_state'; import { preload } from '../actions/preload'; import { IntlProvider } from 'react-intl'; import ErrorBoundary from '../components/error_boundary'; @@ -30,6 +32,9 @@ const validLocale = locale => Object.keys(messages).includes(locale); export const store = configureStore(); +const hydrateAction = hydrateStore(initialState); + +store.dispatch(hydrateAction); store.dispatch(preload()); store.dispatch(fetchMe()); store.dispatch(fetchInstance());