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
RevLine 
[d565449]1// eslint-disable-next-line no-unused-vars
[0c6b92a]2import React from "react";
3import {BrowserRouter as Router, Route, Routes} from "react-router-dom";
4import BrowseMaps from "./pages/BrowseMaps/BrowseMaps.jsx";
[d565449]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";
[0c6b92a]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";
[79a0317]21import {AuthCallback} from "./pages/AuthCallback.jsx";
22import PrivacyPolicy from "./pages/PrivacyPolicy/PrivacyPolicy.jsx";
23import TermsOfService from "./pages/TermsOfService/TermsOfService.jsx";
[0c6b92a]24
[d565449]25
26function 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
60export default App;
Note: See TracBrowser for help on using the repository browser.