2022-04-01 09:38:30 +03:00
|
|
|
import { createRoot } from "react-dom/client";
|
2022-05-21 07:21:06 +03:00
|
|
|
import { Provider } from "react-redux";
|
|
|
|
import store from "./store";
|
|
|
|
import { updateStateWithLocation } from "./store/modules/location";
|
2021-12-08 18:43:52 +03:00
|
|
|
import App from "./App";
|
|
|
|
import "./less/global.less";
|
2022-07-07 17:02:40 +03:00
|
|
|
import "./helpers/polyfill";
|
2022-01-31 14:16:01 +03:00
|
|
|
import "./css/index.css";
|
2021-12-08 18:43:52 +03:00
|
|
|
|
2022-04-01 09:38:30 +03:00
|
|
|
const container = document.getElementById("root");
|
|
|
|
const root = createRoot(container as HTMLElement);
|
|
|
|
root.render(
|
2022-06-21 03:35:46 +03:00
|
|
|
<Provider store={store}>
|
|
|
|
<App />
|
|
|
|
</Provider>
|
2021-12-08 18:43:52 +03:00
|
|
|
);
|
2022-05-21 07:21:06 +03:00
|
|
|
|
|
|
|
window.onload = () => {
|
|
|
|
store.dispatch(updateStateWithLocation());
|
|
|
|
window.onpopstate = () => {
|
|
|
|
store.dispatch(updateStateWithLocation());
|
|
|
|
};
|
|
|
|
};
|