source: imaps-frontend/src/App.jsx@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 1.9 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";
21
22
23function App() {
24
25 return (
26
27 <AppProvider>
28 <Router>
29 <Routes>
30
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/>}/>
40
41
42 <Route path="/Login" element={<LoginPage/>}/>
43 <Route path="/Signup" element={<Signup/>}/>
44
45 <Route path="*" element={<Error/>}/>
46 </Routes>
47 </Router>
48 </AppProvider>
49
50
51 );
52}
53
54export default App;
Note: See TracBrowser for help on using the repository browser.