-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
56 lines (48 loc) · 1.67 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
import React from "react";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
import { Container } from "reactstrap";
// import Loading from "./components/Loading";
import NavBar from "./components/NavBar";
import Home from "./views/Home";
import Profile from "./views/Profile";
// import { useAuth0 } from "@auth0/auth0-react";
import history from "./utils/history";
// styles
import "./App.css";
// fontawesome
import initFontAwesome from "./utils/initFontAwesome";
import FlightList from "./views/FlightList";
import Flight from "./views/FlightDetails";
import PurchaseList from "./views/MyPurchases";
import PurchaseCompleted from "./views/PurchaseCompleted";
import Recommendations from "./views/Recommendations";
initFontAwesome();
const App = () => {
// const { isLoading, error } = useAuth0();
// if (error) {
// return <div>Oops... {error.message}</div>;
// }
// if (isLoading) {
// return <Loading />;
// }
return (
<Router>
<div id="app" className="d-flex flex-column h-100">
<NavBar />
<Container className="flex-grow-1 mt-5">
<Routes>
<Route path="/" element={<Home/>} />
<Route path="/profile" element={<Profile/>} />
<Route path="/flights" element={<FlightList/>}/>
<Route path="/details/:flightId" element={<Flight/>}/>
<Route path="/mypurchases" element={<PurchaseList/>} />
<Route path="/purchase" element={<PurchaseCompleted/>} />
<Route path="/recommendations" element={<Recommendations/>} />
</Routes>
</Container>
{/*<Footer />*/}
</div>
</Router>
);
};
export default App;