2023-03-06 09:02:40 +00:00
|
|
|
import React, { lazy } from 'react';
|
2023-02-04 00:36:31 +00:00
|
|
|
import ReactDOM from 'react-dom/client';
|
2022-09-16 17:18:15 +00:00
|
|
|
import { Provider } from 'react-redux';
|
|
|
|
import { PersistGate } from 'redux-persist/integration/react';
|
2023-02-04 00:36:31 +00:00
|
|
|
import { store } from './app/store';
|
2022-12-14 22:34:25 +00:00
|
|
|
import { persistor } from './persistor';
|
2023-03-06 09:02:40 +00:00
|
|
|
import '@fontsource/inter/100.css';
|
|
|
|
import '@fontsource/inter/200.css';
|
|
|
|
import '@fontsource/inter/300.css';
|
|
|
|
import '@fontsource/inter/400.css';
|
|
|
|
import '@fontsource/inter/500.css';
|
|
|
|
import '@fontsource/inter/600.css';
|
|
|
|
import '@fontsource/inter/700.css';
|
|
|
|
import '@fontsource/inter/800.css';
|
|
|
|
import '@fontsource/inter/900.css';
|
2022-09-16 17:18:15 +00:00
|
|
|
|
2023-02-04 00:36:31 +00:00
|
|
|
import Loading from './Loading';
|
2022-09-16 17:18:15 +00:00
|
|
|
|
2022-12-24 18:23:21 +00:00
|
|
|
// Localization
|
|
|
|
import './i18n';
|
|
|
|
|
2023-03-06 09:02:40 +00:00
|
|
|
const App = lazy(() => import('./app/App'));
|
|
|
|
const ThemeLocaleProvider = lazy(() => import('./app/ThemeLocaleProvider'));
|
|
|
|
|
2022-09-16 17:18:15 +00:00
|
|
|
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
|
|
|
<React.StrictMode>
|
|
|
|
<Provider store={store}>
|
|
|
|
<PersistGate loading={<Loading />} persistor={persistor}>
|
2023-03-06 09:02:40 +00:00
|
|
|
<React.Suspense fallback={<Loading showText />}>
|
|
|
|
<ThemeLocaleProvider>
|
|
|
|
<App />
|
|
|
|
</ThemeLocaleProvider>
|
|
|
|
</React.Suspense>
|
2022-09-16 17:18:15 +00:00
|
|
|
</PersistGate>
|
|
|
|
</Provider>
|
|
|
|
</React.StrictMode>
|
|
|
|
);
|