Bachelorthesis_Code/frontend/src/App.js

44 lines
1.6 KiB
JavaScript
Raw Normal View History

2021-07-10 22:40:27 +00:00
import React from "react";
import Navbar from "./components/Navbar";
import "./App.css";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import Home from "./components/pages/Home";
import Ueber from "./components/pages/Ueber";
2021-06-07 02:14:00 +00:00
import Lizenzen from "./components/pages/lizenzen";
2021-06-07 03:03:18 +00:00
import Privacy from "./components/pages/Privacy";
2021-06-21 01:51:15 +00:00
import Login from "./components/pages/Login";
import Register from "./components/pages/Register";
import Manual from "./components/pages/Manual";
import Secret from "./components/pages/Secret";
2021-06-23 03:12:01 +00:00
import Umfrage from "./components/pages/Umfrage";
import PrivateRoute from "./auth/PrivateRoute";
import { useAuth } from "./auth/AuthProvider";
2021-07-11 23:04:50 +00:00
import BehaviorNormal from "./components/pages/BehaviorNormal";
2021-05-05 01:08:58 +00:00
function App() {
const [isLoggedIn] = useAuth();
isLoggedIn ? (document.title = isLoggedIn) : document.title = isLoggedIn;
return (
<>
<Router>
<Navbar />
<Switch>
<Route path="/" exact component={Home} />
<Route path="/services" component={Ueber} />
2021-06-07 02:14:00 +00:00
<Route path="/lizenzen" component={Lizenzen} />
2021-06-07 03:03:18 +00:00
<Route path="/privacy" component={Privacy} />
2021-06-21 01:51:15 +00:00
<Route path="/login" component={Login} />
<Route path="/register" component={Register} />
<Route path="/manual" component={Manual} />
<Route path="/ueber" component={Ueber} />
2021-07-11 23:04:50 +00:00
<PrivateRoute path="/behavior" component={BehaviorNormal} />
<PrivateRoute path="/secret" component={Secret} />
2021-06-23 03:12:01 +00:00
<PrivateRoute path="/umfrage" component={Umfrage} />
</Switch>
</Router>
</>
);
2021-05-05 01:08:58 +00:00
}
export default App;