-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
36 lines (33 loc) · 1.24 KB
/
index.js
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
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import { Route } from 'react-router-dom'
import { Provider } from 'react-redux';
import {store, history} from './reducers/init.stores';
import registerServiceWorker from './registerServiceWorker';
import { ConnectedRouter } from 'react-router-redux';
import LoginContainer from './containers/#.container';
import DashboardContainer from './containers/dashboard.container';
import { addLocaleData, IntlProvider } from 'react-intl';
import en from 'react-intl/locale-data/en';
import es from 'react-intl/locale-data/es';
// Our translated strings
import localeData from './translation/translation.json';
addLocaleData([...en, ...es]);
// Try full locale, try locale without region code, fallback to 'en'
const messages = localeData.en;
const language = 'en';
ReactDOM.render(
<Provider store={store}>
<IntlProvider locale={language} messages={messages}>
<ConnectedRouter history={history}>
<div>
<Route path="/" exact component={LoginContainer}/>
<Route path="/dashboard" component={DashboardContainer}/>
</div>
</ConnectedRouter>
</IntlProvider>
</Provider>,
document.getElementById('root')
);
registerServiceWorker();