forked from caraml-dev/turing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.js
44 lines (36 loc) · 1.07 KB
/
bootstrap.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React from "react";
import "./assets/style.scss";
import * as serviceWorker from "./serviceWorker";
import App from "./App";
import * as Sentry from "@sentry/browser";
import { ConfigProvider, useConfig } from "./config";
import { BrowserRouter } from "react-router-dom";
import { createRoot } from "react-dom/client";
const SentryApp = ({ children }) => {
const {
sentryConfig: { dsn, environment, tags },
} = useConfig();
Sentry.init({ dsn, environment });
Sentry.setTags(tags);
return children;
};
const TuringUI = () => (
<React.StrictMode>
<ConfigProvider>
<SentryApp>
<BrowserRouter>
<App />
</BrowserRouter>
</SentryApp>
</ConfigProvider>
</React.StrictMode>
);
const container = document.getElementById("root")
const root = createRoot(container);
root.render(
TuringUI()
);
// 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: https://bit.ly/CRA-PWA
serviceWorker.unregister();