aboutsummaryrefslogtreecommitdiff
path: root/modern/src/index.js
blob: 43462d35d029e2d65e8e10759bbb7e2e588708fb (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
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();