-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
42 lines (34 loc) · 1.3 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
import React from 'react';
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import './App.css';
import {Helmet} from 'react-helmet';
// import our component
//import ReportTime from "./ReportTime.js";
//import Child from "./Child.js";
import FormSite from "./FormSite.js";
import BarSite from "./BarSite.js";
import DonutSite from "./DonutSite.js";
import ReportTime from "./ReportTime.js";
import CourseInfo from "./CourseInfo.js"
// main component of app is always one page (depending on url path) + Menu below
const App = () => {
return (
<Router>
<div>
<Helmet>
<title>ReportTime</title>
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet"></link>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"></link>
</Helmet>
</div>
<Switch>
<Route exact path="/" component={FormSite} /> {/*Den första visas som default*/}
<Route path="/BarSite.js" component={BarSite} />
<Route path="/DonutSite.js" component={DonutSite} />
<Route path="/ReportTime.js" component={ReportTime} />
<Route path="/CourseInfo.js" component={CourseInfo} />
</Switch>
</Router>
);
};
export default App;