| 1 | import React from "react"; |
| 2 | import ReactDOM from "react-dom/client"; |
| 3 | import { Provider } from "react-redux"; |
| 4 | import { PersistGate } from "redux-persist/integration/react"; |
| 5 | import App from "./App"; |
| 6 | import "./index.css"; |
| 7 | import { persistor, store } from "./redux/store"; |
| 8 | |
| 9 | (async () => { |
| 10 | const container = document.getElementById("root") as HTMLElement; |
| 11 | |
| 12 | // Create React root |
| 13 | const root = ReactDOM.createRoot(container); |
| 14 | |
| 15 | root.render( |
| 16 | <React.StrictMode> |
| 17 | <Provider store={store}> |
| 18 | <PersistGate loading={null} persistor={persistor}> |
| 19 | <App /> |
| 20 | </PersistGate> |
| 21 | </Provider> |
| 22 | </React.StrictMode>, |
| 23 | ); |
| 24 | })(); |