blob: 7f60098d5dbd9c02943496c70d20b41939925c97 (
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
31
32
33
34
|
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 config from './config'
import configureStore from './store/configure-store'
setupSocketConnection(() => {
const store = configureStore()
console.log('test', config)
// Initialize Sentry if the user has configured a DSN
const dsn = config['SENTRY_DSN']
if (dsn) {
Sentry.init({
environment: process.env.NODE_ENV,
dsn: dsn,
integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 0.1,
})
}
ReactDOM.render(
<Provider store={store}>
<Routes />
</Provider>,
document.getElementById('root')
)
})
|