aboutsummaryrefslogtreecommitdiff
path: root/modern/src/index.js
blob: cb6710d5f12165578e050ca4df4380341b6ddea0 (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
import 'typeface-roboto';
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';

import App from './App';
import * as serviceWorker from './serviceWorker';
import store from './store';
import { LocalizationProvider } from './common/components/LocalizationProvider';

const base = window.location.href.indexOf('modern') >= 0 ? '/modern' : null;

ReactDOM.render((
  <Provider store={store}>
    <LocalizationProvider>
      <BrowserRouter basename={base}>
        <App />
      </BrowserRouter>
    </LocalizationProvider>
  </Provider>
), document.getElementById('root'));

serviceWorker.register();