2019-04-16 03:06:39 +03:00
|
|
|
import React, { Suspense } from 'react'
|
2019-04-15 19:56:40 +03:00
|
|
|
import ReactDOM from 'react-dom'
|
|
|
|
import { Provider } from 'react-redux'
|
|
|
|
import ReactGA from 'react-ga'
|
2019-04-16 03:06:39 +03:00
|
|
|
|
2019-04-15 19:56:40 +03:00
|
|
|
import './i18n'
|
|
|
|
import App from './pages/App'
|
|
|
|
import store from './store'
|
|
|
|
import './index.scss'
|
2018-03-11 08:50:54 +03:00
|
|
|
|
2019-04-16 03:06:39 +03:00
|
|
|
if (process.env.NODE_ENV === 'production') {
|
2019-04-15 19:56:40 +03:00
|
|
|
ReactGA.initialize('UA-128182339-1')
|
2019-04-16 03:06:39 +03:00
|
|
|
} else {
|
|
|
|
ReactGA.initialize('test', { testMode: true })
|
2018-10-28 14:12:59 +03:00
|
|
|
}
|
2019-04-16 03:06:39 +03:00
|
|
|
|
2019-04-15 19:56:40 +03:00
|
|
|
ReactGA.pageview(window.location.pathname + window.location.search)
|
2018-10-28 14:05:08 +03:00
|
|
|
|
2019-04-16 03:06:39 +03:00
|
|
|
ReactDOM.render(
|
|
|
|
// catch the suspense in case translations are not yet loaded
|
|
|
|
<Suspense fallback={null}>
|
2018-10-28 02:43:16 +03:00
|
|
|
<Provider store={store}>
|
2018-10-07 14:31:17 +03:00
|
|
|
<App />
|
2019-04-16 03:06:39 +03:00
|
|
|
</Provider>
|
|
|
|
</Suspense>,
|
|
|
|
document.getElementById('root')
|
|
|
|
)
|