blob: fe119dfbb20b211ac6ec1af573cf3a6af4390bf9 (
plain)
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
|
import React from 'react'
import ReactDOM from 'react-dom'
import * as Sentry from '@sentry/react'
import { Integrations } from '@sentry/tracing'
import { Provider } from 'react-redux'
import { setupSocketConnection } from './api/socket'
import './index.sass'
import Routes from './routes'
import configureStore from './store/configure-store'
setupSocketConnection(() => {
const store = configureStore()
// Initialize Sentry if the user has configured a DSN
if (process.env.REACT_APP_SENTRY_DSN) {
Sentry.init({
environment: process.env.NODE_ENV,
dsn: process.env.REACT_APP_SENTRY_DSN,
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 0.5,
})
}
ReactDOM.render(
<Provider store={store}>
<Routes />
</Provider>,
document.getElementById('root')
)
})
|