idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 1 | "use strict"; |
idillon | 5e89743 | 2022-09-16 13:28:09 -0400 | [diff] [blame] | 2 | import "./index.scss"; |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 3 | import React from "react"; |
| 4 | import ReactDOM from "react-dom"; |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 5 | import App from "./App.js"; |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 6 | import { store } from "../redux/store"; |
| 7 | import { Provider } from "react-redux"; |
idillon | 5e89743 | 2022-09-16 13:28:09 -0400 | [diff] [blame] | 8 | import { BrowserRouter as Router } from "react-router-dom"; |
idillon | 5815c73 | 2022-09-16 13:54:45 -0400 | [diff] [blame^] | 9 | import './i18n'; |
Larbi Gharib | e9af973 | 2021-03-31 15:08:01 +0100 | [diff] [blame] | 10 | |
idillon | 8e6c006 | 2022-09-16 13:34:43 -0400 | [diff] [blame] | 11 | // import config from "../sentry-client.config.json" |
idillon | 5e89743 | 2022-09-16 13:28:09 -0400 | [diff] [blame] | 12 | import * as Sentry from "@sentry/react"; |
| 13 | import { BrowserTracing } from "@sentry/tracing"; |
| 14 | |
| 15 | //import { CssBaseline } from '@mui/material' |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 16 | //import * as serviceWorker from './serviceWorker' |
idillon | 5e89743 | 2022-09-16 13:28:09 -0400 | [diff] [blame] | 17 | |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 18 | const rootEl = document.getElementById("root"); |
| 19 | var exports = {}; |
| 20 | |
idillon | 8e6c006 | 2022-09-16 13:34:43 -0400 | [diff] [blame] | 21 | // Sentry.init({ |
| 22 | // ...config, |
| 23 | // integrations: [new BrowserTracing()], |
| 24 | // }); |
idillon | 5e89743 | 2022-09-16 13:28:09 -0400 | [diff] [blame] | 25 | |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 26 | const render = (Component) => |
| 27 | ReactDOM.render( |
| 28 | <Provider store={store}> |
| 29 | <React.StrictMode> |
| 30 | <Router> |
| 31 | <Component /> |
| 32 | </Router> |
| 33 | </React.StrictMode> |
| 34 | </Provider>, |
| 35 | rootEl |
| 36 | ); |
Larbi Gharib | e9af973 | 2021-03-31 15:08:01 +0100 | [diff] [blame] | 37 | |
Adrien Béraud | a2bf6fd | 2021-04-08 01:06:37 -0400 | [diff] [blame] | 38 | render(App) |
Adrien Béraud | e74741b | 2021-04-19 13:22:54 -0400 | [diff] [blame] | 39 | |
idillon | d858c18 | 2022-09-16 13:18:26 -0400 | [diff] [blame] | 40 | if (import.meta.webpackHot) |
| 41 | import.meta.webpackHot.accept("./App", () => { |
| 42 | try { |
| 43 | render(App); |
| 44 | } catch (e) { |
| 45 | location.reload(); |
| 46 | } |
| 47 | }); |