1
|
import './App.css'
|
2
|
import { Routes, Route, Link } from 'react-router-dom'
|
3
|
import Home from './features/Home/Home'
|
4
|
import Catalog from './features/Catalog/Catalog'
|
5
|
import NotFound from './features/NotFound/NotFound'
|
6
|
import { Box, Container, Paper, Theme } from '@mui/material'
|
7
|
import { ThemeProvider } from '@emotion/react'
|
8
|
import { useSelector } from 'react-redux'
|
9
|
import { RootState } from './features/redux/store'
|
10
|
import Login from './features/Auth/Login'
|
11
|
import { RoutedCatalogItemDetail } from './features/Catalog/CatalogItemDetail'
|
12
|
import Navigation from './features/Navigation/Navigation'
|
13
|
import TrackingTool from './features/TrackingTool/TrackingTool'
|
14
|
import Logout from './features/Auth/Logout'
|
15
|
import ThemeWrapper from './features/Theme/ThemeWrapper'
|
16
|
import EditHome from "./features/Home/EditHome"
|
17
|
import Notification from './features/Notification/Notification'
|
18
|
import { Fragment } from 'react'
|
19
|
import Administration from "./features/Administration/Administration"
|
20
|
import Register from "./features/Auth/Register"
|
21
|
|
22
|
const App = () => {
|
23
|
return (
|
24
|
<ThemeWrapper>
|
25
|
<Fragment>
|
26
|
<Notification />
|
27
|
<Navigation>
|
28
|
<Box sx={{ mx: 5 }}>
|
29
|
<Routes>
|
30
|
<Route path="/" element={<Home />} />
|
31
|
<Route path="/editHome" element={<EditHome />} />
|
32
|
<Route path="/catalog" element={<Catalog />} />
|
33
|
<Route
|
34
|
path="/catalog/:itemId"
|
35
|
element={<RoutedCatalogItemDetail />}
|
36
|
/>
|
37
|
<Route path="/login" element={<Login />} />
|
38
|
<Route path="/register" element={<Register />} />
|
39
|
<Route path="/logout" element={<Logout />} />
|
40
|
<Route path="/map" element={<TrackingTool />} />
|
41
|
<Route path="/administration" element={<Administration />}/>
|
42
|
<Route path="*" element={<NotFound />} />
|
43
|
</Routes>
|
44
|
</Box>
|
45
|
</Navigation>
|
46
|
</Fragment>
|
47
|
</ThemeWrapper>
|
48
|
)
|
49
|
}
|
50
|
|
51
|
export default App
|