forked from BrendaOrtega/tienda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
29 lines (23 loc) · 774 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
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import {BrowserRouter} from 'react-router-dom';
import 'antd/dist/antd.css';
import '../node_modules/font-awesome/css/font-awesome.min.css';
import registerServiceWorker from './registerServiceWorker';
//redux
import configureStore from './redux/store/store';
import {Provider} from 'react-redux';
import {checkForUser} from './redux/actions/userAction';
export const store = configureStore();
store.dispatch(checkForUser());
const WithRouter = () => (
<Provider store={store}>
<BrowserRouter>
<App />
</BrowserRouter>
</Provider>
);
ReactDOM.render(<WithRouter />, document.getElementById('root'));
registerServiceWorker();