-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
29 lines (26 loc) · 972 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 { Provider } from 'react-redux'
import { BrowserRouter,Switch,Route,Redirect } from 'react-router-dom'
import store from './store'
import AuthorizedRoute from './AuthorizedRoute'
import UnauthorizedLayout from './layouts/UnauthorizedLayout'
import PrimaryLayout from './layouts/PrimaryLayout'
import registerServiceWorker from './registerServiceWorker';
import './public/css/index.css'
import 'antd/dist/antd.css'
const App = props => (
<Provider store={store}>
<BrowserRouter>
<div>
<Switch>
<Route path="/auth" component={UnauthorizedLayout} />
<AuthorizedRoute path="/app" component={PrimaryLayout} />
<Redirect to="/auth" />
</Switch>
</div>
</BrowserRouter>
</Provider>
)
ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();