-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
24 lines (21 loc) · 913 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
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import Leaderboard from './components/LeaderBoard';
import QuestionSpace from './components/QuestionSpace';
import Logout from './components/Logout';
import { BrowserRouter } from 'react-router-dom';
import { Switch, Route } from 'react-router-dom';
import registerServiceWorker from './registerServiceWorker';
const Main = () => (
<BrowserRouter>
<Switch>
<Route exact path='/' component={App} />
<Route exact path="/leaderboard" component={Leaderboard} />
<Route exact path="/QuestionSpace" component={QuestionSpace} />
<Route exact path="/logout" component={Logout} />
</Switch>
</BrowserRouter>
)
ReactDOM.render(<Main />, document.getElementById('root'));
registerServiceWorker();