From 02e767b57c852ef2b10f8b88812c7f2975f81e2d Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 9 Jun 2020 21:01:54 +0300 Subject: [PATCH] Simplify locales preloading --- packages/app/components/user/factory.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/app/components/user/factory.ts b/packages/app/components/user/factory.ts index c9c8583..210e6ff 100644 --- a/packages/app/components/user/factory.ts +++ b/packages/app/components/user/factory.ts @@ -2,7 +2,6 @@ import { authenticate, logoutStrangers } from 'app/components/accounts/actions'; import { getActiveAccount } from 'app/components/accounts/reducer'; import request from 'app/services/request'; import { Store } from 'app/reducers'; -import i18n from 'app/services/i18n'; import { changeLang } from './actions'; import bearerHeaderMiddleware from './middlewares/bearerHeaderMiddleware'; @@ -45,10 +44,6 @@ export function factory(store: Store): Promise { // auto-detect guest language await store.dispatch(changeLang(user.lang)); - }) - .then(() => { - // Preload the current locale before app will be started - i18n.require(store.getState().i18n.locale); }); return promise;