-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathApp.js
More file actions
48 lines (38 loc) · 1.56 KB
/
Copy pathApp.js
File metadata and controls
48 lines (38 loc) · 1.56 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
38
39
40
41
42
43
44
45
46
47
48
import React, {useEffect, useState} from "react";
import {useSelector, useDispatch, Provider} from 'react-redux';
import './App.css';
import { store } from './utils/store';
import {BrowserRouter as Router, Routes, Route, useLocation} from "react-router-dom";
import {
WelcomePage,
RegisterPage,
LogInPage,
ResetPasswordPage,
SetNewPasswordPage,
NotFound,
LogoutPage
} from "./pages/Public";
import MySpace from "./pages/MySpace";
import Competition from "./pages/Competition";
import {InitStravaLink, ReturnStravaLink} from "./pages/StravaLink";
function App() {
return (
<Router>
<Routes>
<Route excat path="/" element={<WelcomePage />} />
<Route excat path="signup" element={<RegisterPage />} />
<Route excat path="login" element={<LogInPage />} />
<Route excat path="logout" element={<LogoutPage />} />
<Route excat path="password" element={<ResetPasswordPage />} />
<Route excat path="password/reset/:id/:token" element={<SetNewPasswordPage />} />
<Route excat path="dashboard" element={<MySpace />} />
<Route path="competition/:id" element={<Competition />} />
<Route excat path="strava/link" element={<InitStravaLink />} />
<Route excat path="strava/return" element={<ReturnStravaLink />} />
{/* Add the catch-all route last */}
<Route path="*" element={<NotFound />} />
</Routes>
</Router>
);
}
export default App;