All files / src index.js

0% Statements 0/8
100% Branches 0/0
0% Functions 0/1
0% Lines 0/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 45 46 47 48 49 50 51 52 53 54 55                                                                                                             
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { HashRouter } from 'react-router-dom'
import I18n from 'redux-i18n'
import * as generalConstants from 'common/utils/general.constants'
import * as generalUtils from 'common/utils/general.utils'
import { PersistGate } from 'redux-persist/integration/react'
import colors from 'colors'
import * as Sentry from '@sentry/react'
import { Integrations } from '@sentry/tracing'
 
import { translations } from 'common/locales/translations'
import configureStore from 'reducers/configureStore'
import Main from 'modules/main/Main'
 
import './index.css'
import * as serviceWorker from './serviceWorker'
 
const { store, persistor } = configureStore()
 
Sentry.init({
  dsn: generalConstants.SENTRY_URL,
  integrations: [new Integrations.BrowserTracing()],
  tracesSampleRate: 1.0,
})
 
ReactDOM.render(
  <React.StrictMode>
    <Provider store={store}>
      <PersistGate loading={null} persistor={persistor}>
        <I18n
          translations={translations}
          initialLang={generalUtils.detectBrowserLanguage()}
          fallbackLang="en"
        >
          <HashRouter>
            <Main />
          </HashRouter>
        </I18n>
      </PersistGate>
    </Provider>
  </React.StrictMode>,
  document.getElementById('root'),
)
 
serviceWorker.unregister()
 
setTimeout(() => {
  colors.enable()
 
  console.log(colors.zalgo(generalConstants.BOOKSYS_CONSOLE_MESSAGE))
  console.log(colors.random(generalConstants.BOOKSYS_CONSOLE_MESSAGE))
}, 2000)