[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";
|
---|
| 21 |
|
---|
[d565449] | 22 |
|
---|
| 23 | function App() {
|
---|
| 24 |
|
---|
[0c6b92a] | 25 | return (
|
---|
[d565449] | 26 |
|
---|
[0c6b92a] | 27 | <AppProvider>
|
---|
| 28 | <Router>
|
---|
| 29 | <Routes>
|
---|
[d565449] | 30 |
|
---|
[0c6b92a] | 31 | <Route element={<ProtectedRoute/>}>
|
---|
| 32 | <Route path="/myMaps/:mapName/Draw" element={<Draw/>}/>
|
---|
| 33 | <Route path="/myMaps" element={<MyMaps/>}/>
|
---|
| 34 | <Route path="/myMaps/:mapName/View" element={<MapView isPrivate={true}/>}/>
|
---|
| 35 | <Route path="/Admin" element={<AdminPage/>}/>
|
---|
| 36 | </Route>
|
---|
| 37 | <Route path="/" element={<IMaps/>}/>
|
---|
| 38 | <Route path="/Maps/:mapName/View" element={<MapView isPrivate={false}/>}/>
|
---|
| 39 | <Route path="/Maps" element={<BrowseMaps/>}/>
|
---|
[d565449] | 40 |
|
---|
| 41 |
|
---|
[0c6b92a] | 42 | <Route path="/Login" element={<LoginPage/>}/>
|
---|
| 43 | <Route path="/Signup" element={<Signup/>}/>
|
---|
[d565449] | 44 |
|
---|
[0c6b92a] | 45 | <Route path="*" element={<Error/>}/>
|
---|
| 46 | </Routes>
|
---|
| 47 | </Router>
|
---|
| 48 | </AppProvider>
|
---|
[d565449] | 49 |
|
---|
| 50 |
|
---|
[0c6b92a] | 51 | );
|
---|
[d565449] | 52 | }
|
---|
| 53 |
|
---|
| 54 | export default App;
|
---|