2021-07-06 19:26:39 +03:00
|
|
|
import React, { Suspense } from "react";
|
2021-07-03 12:15:26 +03:00
|
|
|
import ReactDOM from "react-dom";
|
|
|
|
import { ThemeProvider } from "@material-ui/styles";
|
|
|
|
import { CssBaseline } from "@material-ui/core";
|
|
|
|
import Themes from "./themes";
|
|
|
|
import App from "./components/App";
|
|
|
|
import * as serviceWorker from "./serviceWorker";
|
|
|
|
import { LayoutProvider } from "./context/LayoutContext";
|
|
|
|
import { UserProvider } from "./context/UserContext";
|
2021-07-05 20:16:56 +03:00
|
|
|
import "./utils/i18n";
|
2021-07-03 12:15:26 +03:00
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<LayoutProvider>
|
|
|
|
<UserProvider>
|
|
|
|
<ThemeProvider theme={Themes.default}>
|
|
|
|
<CssBaseline />
|
2021-07-06 19:26:39 +03:00
|
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
|
|
<App />
|
|
|
|
</Suspense>
|
2021-07-03 12:15:26 +03:00
|
|
|
</ThemeProvider>
|
|
|
|
</UserProvider>
|
|
|
|
</LayoutProvider>,
|
2021-07-05 20:16:56 +03:00
|
|
|
document.getElementById("root")
|
2021-07-03 12:15:26 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
// If you want your app to work offline and load faster, you can change
|
|
|
|
// unregister() to register() below. Note this comes with some pitfalls.
|
|
|
|
// Learn more about service workers: http://bit.ly/CRA-PWA
|
|
|
|
serviceWorker.unregister();
|