mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Ensure translations are fetched before loading app
(cherry picked from commit ad2721dc55f3233e4c299babe5744418bc530418) Closes #3868 Closes #3871
This commit is contained in:
parent
34ad4ef337
commit
eeaea17c1f
6 changed files with 38 additions and 18 deletions
|
@ -2,7 +2,7 @@ import { createBrowserHistory } from 'history';
|
|||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import createAppStore from 'Store/createAppStore';
|
||||
import App from './App/App';
|
||||
import { fetchTranslations } from 'Utilities/String/translate';
|
||||
|
||||
import 'Diag/ConsoleApi';
|
||||
import './preload';
|
||||
|
@ -12,11 +12,14 @@ import './index.css';
|
|||
|
||||
const history = createBrowserHistory();
|
||||
const store = createAppStore(history);
|
||||
const hasTranslationsError = !await fetchTranslations();
|
||||
const { default: App } = await import('./App/App');
|
||||
|
||||
render(
|
||||
<App
|
||||
store={store}
|
||||
history={history}
|
||||
hasTranslationsError={hasTranslationsError}
|
||||
/>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue