Projekt

Obecné

Profil

Stáhnout (1.4 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 ec88f816 Vaclav Honzik
14 846f4f3c Vaclav Honzik
const App = () => {
15
    const theme: Theme = useSelector((state: RootState) => state.theme.theme)
16
17
    return (
18
        <ThemeProvider theme={theme}>
19 456b0111 Vaclav Honzik
            <Navigation>
20
                    <Container>
21
                        <Routes>
22
                            <Route path="/" element={<Home />} />
23
                            <Route path="/catalog" element={<Catalog />} />
24
                            <Route
25
                                path="/catalog/:itemId"
26
                                element={<CatalogItemDetail />}
27
                            />
28
                            <Route path="/login" element={<Login />} />
29
                            <Route path="*" element={<NotFound />} />
30
                        </Routes>
31
                    </Container>
32
            </Navigation>
33 846f4f3c Vaclav Honzik
        </ThemeProvider>
34
    )
35
}
36 ec88f816 Vaclav Honzik
37 3b85c076 Vaclav Honzik
export default App