source: imaps-frontend/src/App.jsx@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

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