-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (29 loc) · 1.28 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 { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import { composeWithDevTools } from 'redux-devtools-extension';
import thunk from 'redux-thunk';
import reducers from './reducers';
import MuiThemeProvider from '@material-ui/core/styles/MuiThemeProvider';
import { createMuiTheme } from '@material-ui/core/styles';
import { createGenerateClassName, jssPreset } from '@material-ui/core/styles';
import Theme from './style/themes/theme.js';
import { create } from 'jss';
import rtl from 'jss-rtl';
import JssProvider from 'react-jss/lib/JssProvider';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
const createStoreWithMiddleware = composeWithDevTools(applyMiddleware(thunk))(createStore);
const jss = create({ plugins: [...jssPreset().plugins, rtl()] });
const generateClassName = createGenerateClassName();
ReactDOM.render(<JssProvider jss={jss} generateClassName={generateClassName}>
<Provider store={createStoreWithMiddleware(reducers)}>
<MuiThemeProvider theme={createMuiTheme(Theme)}>
<App />
</MuiThemeProvider>
</Provider>
</JssProvider>
, document.getElementById('root'));
registerServiceWorker();