[d565449] | 1 | // eslint-disable-next-line no-unused-vars
|
---|
[0c6b92a] | 2 | import React from "react";
|
---|
| 3 | import {BrowserRouter as Router, Route, Routes} from "react-router-dom";
|
---|
| 4 | import BrowseMaps from "./pages/BrowseMaps/BrowseMaps.jsx";
|
---|
[d565449] | 5 | import LoginPage from "./pages/Login/Login";
|
---|
| 6 | import Signup from "./pages/Signup/Signup";
|
---|
| 7 | import IMaps from "./pages/IMaps/IMaps";
|
---|
| 8 | import Draw from "./pages/Draw/Draw";
|
---|
| 9 | import Error from "./pages/Error/Error";
|
---|
| 10 | import ProtectedRoute from "./components/ProtectedRoute/ProtectedRoute";
|
---|
| 11 | import "./App.css";
|
---|
[0c6b92a] | 12 | import MapView from "./pages/MapView/MapView.jsx";
|
---|
| 13 | import MyMaps from "./pages/MyMaps/MyMaps.jsx";
|
---|
| 14 |
|
---|
| 15 | import '@fontsource/roboto/300.css';
|
---|
| 16 | import '@fontsource/roboto/400.css';
|
---|
| 17 | import '@fontsource/roboto/500.css';
|
---|
| 18 | import '@fontsource/roboto/700.css';
|
---|
| 19 | import {AppProvider} from "./components/AppContext/AppContext.jsx";
|
---|
| 20 | import AdminPage from "./pages/AdminPage/AdminPage.jsx";
|
---|
[79a0317] | 21 | import {AuthCallback} from "./pages/AuthCallback.jsx";
|
---|
| 22 | import PrivacyPolicy from "./pages/PrivacyPolicy/PrivacyPolicy.jsx";
|
---|
| 23 | import TermsOfService from "./pages/TermsOfService/TermsOfService.jsx";
|
---|
[0c6b92a] | 24 |
|
---|
[d565449] | 25 |
|
---|
| 26 | function App() {
|
---|
| 27 |
|
---|
[0c6b92a] | 28 | return (
|
---|
[d565449] | 29 |
|
---|
[0c6b92a] | 30 | <AppProvider>
|
---|
| 31 | <Router>
|
---|
| 32 | <Routes>
|
---|
[d565449] | 33 |
|
---|
[0c6b92a] | 34 | <Route element={<ProtectedRoute/>}>
|
---|
[79a0317] | 35 | <Route path="/myMaps/Draw/:mapName" element={<Draw/>}/>
|
---|
[0c6b92a] | 36 | <Route path="/myMaps" element={<MyMaps/>}/>
|
---|
[79a0317] | 37 | <Route path="/myMaps/View/:mapName" element={<MapView isPrivate={true}/>}/>
|
---|
[0c6b92a] | 38 | <Route path="/Admin" element={<AdminPage/>}/>
|
---|
| 39 | </Route>
|
---|
| 40 | <Route path="/" element={<IMaps/>}/>
|
---|
[79a0317] | 41 | <Route path="/Maps/View/:mapName" element={<MapView isPrivate={false}/>}/>
|
---|
[0c6b92a] | 42 | <Route path="/Maps" element={<BrowseMaps/>}/>
|
---|
[79a0317] | 43 | <Route path="/auth-callback" element={<AuthCallback/>}/>
|
---|
| 44 | <Route path={"/privacy-policy"} element={<PrivacyPolicy/>}/>
|
---|
| 45 | <Route path={"/terms-of-service"} element={<TermsOfService/>}/>
|
---|
[d565449] | 46 |
|
---|
| 47 |
|
---|
[0c6b92a] | 48 | <Route path="/Login" element={<LoginPage/>}/>
|
---|
| 49 | <Route path="/Signup" element={<Signup/>}/>
|
---|
[d565449] | 50 |
|
---|
[0c6b92a] | 51 | <Route path="*" element={<Error/>}/>
|
---|
| 52 | </Routes>
|
---|
| 53 | </Router>
|
---|
| 54 | </AppProvider>
|
---|
[d565449] | 55 |
|
---|
| 56 |
|
---|
[0c6b92a] | 57 | );
|
---|
[d565449] | 58 | }
|
---|
| 59 |
|
---|
| 60 | export default App;
|
---|