-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
31 lines (27 loc) · 938 Bytes
/
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
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { ThemeProvider } from 'styled-components';
import { baseStyles } from './styles';
import { theme } from './styles/common';
import { allSagas, rootReducer } from './modules';
import { RoutesMain } from './routes';
import registerServiceWorker from './registerServiceWorker';
const sagaMiddleware = createSagaMiddleware();
const store = createStore(rootReducer, applyMiddleware(sagaMiddleware));
sagaMiddleware.run(allSagas);
const App = () => (
<Provider store={store}>
<ThemeProvider theme={theme}>
<RoutesMain />
</ThemeProvider>
</Provider>
);
const render = () => {
baseStyles();
ReactDOM.render(<App />, document.getElementById('root'));
};
render();
registerServiceWorker();