-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
executable file
·57 lines (39 loc) · 1.11 KB
/
App.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
50
51
52
53
54
55
56
57
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
//If using browser switch to browserrouter.
import {
BrowserRouter as Router,
Route,
Switch
// Link
} from 'react-router-dom';
//Routes
import Home from './Routes/Home/Home.js';
import LoginForm from './Routes/Auth/Login.js';
import RegisterForm from './Routes/Auth/Register.js';
import SettingsManager from './Routes/Settings/Settings.js';
import firebase from 'firebase';
import * as constants from './contstants';
class App extends Component {
constructor(props) {
super(props);
firebase.initializeApp(constants.CONFIG);
document.title = constants.TITLE;
}
render() {
return (
<div>
<Router>
<Switch>
<Route path="/register" component={RegisterForm} />
<Route path="/login" component={LoginForm} />
<Route path="/settings" component={SettingsManager} />
<Route path="/" component={Home} />
</Switch>
</Router>
</div>
);
}
}
export default App;