-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
39 lines (34 loc) · 1.16 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
37
38
39
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, applyMiddleware, compose } from 'redux'
import thunk from 'redux-thunk'
import { Provider } from 'react-redux'
import { BrowserRouter, Route, Redirect, Switch } from 'react-router-dom'
import Login from './container/login/login';
import Register from './container/register/register';
import AuthRoute from './component/authroute/authroute';
import reducers from './reducer'
import './config'
import './index.css';
// import App from './App';
import registerServiceWorker from './registerServiceWorker';
const store = createStore(reducers, compose(
applyMiddleware(thunk),
window.devToolsExtension ? window.devToolsExtension() : f => f
))
ReactDOM.render(
// <App />,
(
<Provider store={store}>
<BrowserRouter>
<div>
<AuthRoute></AuthRoute>
<Route path="/login" component={Login}></Route>
<Route path="/register" component={Register}></Route>
</div>
</BrowserRouter>
</Provider>
),
document.getElementById('root')
);
registerServiceWorker();