Projekt

Obecné

Profil

Stáhnout (1.49 KB) Statistiky
| Větev: | Tag: | Revize:
1 3b85c076 Vaclav Honzik
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 8370b6c1 Vaclav Honzik
import { Container, Paper, Theme } from '@mui/material'
7 846f4f3c Vaclav Honzik
import { ThemeProvider } from '@emotion/react'
8
import { useSelector } from 'react-redux'
9
import { RootState } from './features/redux/store'
10 8370b6c1 Vaclav Honzik
import Login from './features/Auth/Login'
11 f2db3e05 Vaclav Honzik
import CatalogItemDetail from './features/Catalog/CatalogItemDetail'
12 456b0111 Vaclav Honzik
import Navigation from './features/Navigation/Navigation'
13 788ce11e Vaclav Honzik
import TrackingTool from './features/TrackingTool/TrackingTool'
14 ec88f816 Vaclav Honzik
15 846f4f3c Vaclav Honzik
const App = () => {
16
    const theme: Theme = useSelector((state: RootState) => state.theme.theme)
17
18
    return (
19
        <ThemeProvider theme={theme}>
20 456b0111 Vaclav Honzik
            <Navigation>
21 788ce11e Vaclav Honzik
                <Container>
22
                    <Routes>
23
                        <Route path="/" element={<Home />} />
24
                        <Route path="/catalog" element={<Catalog />} />
25
                        <Route
26
                            path="/catalog/:itemId"
27
                            element={<CatalogItemDetail />}
28
                        />
29
                        <Route path="/login" element={<Login />} />
30
                        <Route path="/map" element={<TrackingTool />} />
31
                        <Route path="*" element={<NotFound />} />
32
                    </Routes>
33
                </Container>
34 456b0111 Vaclav Honzik
            </Navigation>
35 846f4f3c Vaclav Honzik
        </ThemeProvider>
36
    )
37
}
38 ec88f816 Vaclav Honzik
39 3b85c076 Vaclav Honzik
export default App