-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
37 lines (35 loc) · 1.3 KB
/
App.js
File metadata and controls
37 lines (35 loc) · 1.3 KB
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
import './App.css';
import Sidebar from "./Components/Sidebar";
import {BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import Home from "./Components/Home";
import ChooseTotalTime from "./Components/ChooseTotalTime";
import {SidebarData} from "./Components/SidebarData";
import ExerciseForm from "./Components/ExerciseForm";
import ChooseExrcise from "./ChooseExrcise";
import Timer from "./Components/Timer";
import SignUp from "./Components/SignUp"
import SignIn from "./Components/SignIn"
function App() {
return (
<Router>
<div className="App">
<Sidebar />
<Route path={"/"} exact component={Home}></Route>
{ SidebarData.map((item, index) => {
return (
<Route key={index} path={item.link} exact component={item.component}></Route>
)
})}
<Route path="/ExerciseForm/:trainingtime/:restTime"
render={(props) => (
<ExerciseForm {...props}/>
)}/>
{/* Temporary Timer route- allows to display or work on Timer component */}
<Route path="/Timer" exact component={() => <Timer time={20*60*1000} />} />
<Route path="/SignUp" exact component={SignUp} ></Route>
<Route path="/SignIn" exact component={SignIn} ></Route>
</div>
</Router>
);
}
export default App;