-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathmain.tsx
40 lines (36 loc) · 1.13 KB
/
main.tsx
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
import React from 'react';
import { createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from 'react-router';
import * as Sentry from '@sentry/react';
import { createRoot } from 'react-dom/client';
import App from './core/app';
import { isDebug, uiVersion } from './core/util';
import './css/main.css';
if (!isDebug()) {
Sentry.init({
dsn: 'https://3f1973bb1fd51855c342e5838a6d620f@o330862.ingest.us.sentry.io/1851857',
environment: 'production',
release: `shoko-webui@${uiVersion()}`,
integrations: [
Sentry.reactRouterV7BrowserTracingIntegration({
useEffect: React.useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
}),
Sentry.replayIntegration({
networkDetailAllowUrls: ['/api/v3/Init/Version'],
maskAllText: true,
blockAllMedia: false,
}),
],
tracesSampleRate: 0.1,
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
});
}
const container = document?.getElementById('app-root');
if (container !== null) {
const root = createRoot(container);
root.render(<App />);
}