-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
23 lines (21 loc) · 814 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
import React from 'react';
import ReactDOM from 'react-dom';
import Upload from './components/Upload';
import Display from './components/Display';
import Callback from './components/Callback';
import registerServiceWorker from './registerServiceWorker';
import { Router, Route, browserHistory } from 'react-router';
import { requireAuth } from './utils/AuthService';
const Root = () => {
return (
<div className="container">
<Router history={browserHistory}>
<Route path="/" component={Display}/>
<Route path="/upload" component={Upload} onEnter={requireAuth} />
<Route path="/callback" component={Callback} />
</Router>
</div>
)
}
ReactDOM.render(<Root />, document.getElementById('root'));
registerServiceWorker();