Fixed: Improve translation loading

(cherry picked from commit 73c5ec1da4dd00301e1b0dddbcea37590a99b045)
This commit is contained in:
Mark McDowall
2023-07-18 20:20:27 -07:00
committed by Bogdan
parent d55906d49a
commit 1a40924db3
5 changed files with 48 additions and 26 deletions

View File

@@ -2,20 +2,14 @@ import { createBrowserHistory } from 'history';
import React from 'react';
import { render } from 'react-dom';
import createAppStore from 'Store/createAppStore';
import { fetchTranslations } from 'Utilities/String/translate';
import App from './App/App';
export async function bootstrap() {
const history = createBrowserHistory();
const store = createAppStore(history);
const hasTranslationsError = !(await fetchTranslations());
render(
<App
store={store}
history={history}
hasTranslationsError={hasTranslationsError}
/>,
<App store={store} history={history} />,
document.getElementById('root')
);
}