forked from olivertsesk/ProStudent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·49 lines (41 loc) · 1.32 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
40
41
42
43
44
45
46
47
48
49
import React from 'react';
import ReactDOM from 'react-dom';
import registerServiceWorker from './registerServiceWorker';
import {
BrowserRouter as Router,
Route,
Redirect,
Switch
} from 'react-router-dom';
import * as firebaseFunctions from './firebase'
import './index.css';
//bodies
import MainPage from './bodies/main'
import NavigationBar from './navbar/navigationBar'
import StudentLanding from './bodies/studentLanding'
import ProfLanding from './bodies/professorLanding'
import AdminLanding from './bodies/adminLanding'
import About from './bodies/about'
import Contact from './bodies/contact'
const Redirection = () => (
<Redirect to={"/main"}/>
);
firebaseFunctions.init();
//<Route path="/app/*" component={MainPage}/>
ReactDOM.render(
<div>
<NavigationBar/>
<Router>
<Switch>
<Route exact path="/main" component={MainPage} />
<Route exact path="/student/*" component={StudentLanding} />
<Route exact path="/prof/*" component={ProfLanding} />
<Route exact path="/admin/*" component={AdminLanding} />
<Route exact path="/about/*" component={About}/>
<Route exact path="/contact/*" component={Contact}/>
<Route path="/*" component={Redirection} />
</Switch>
</Router>
</div>,
document.getElementById('root'));
registerServiceWorker();