1 |
c7d2ced1
|
Václav Honzík
|
import React from 'react'
|
2 |
|
|
import './App.css'
|
3 |
|
|
import { Routes, Route, Link } from 'react-router-dom'
|
4 |
|
|
import Home from './features/Home/Home'
|
5 |
|
|
import Catalog from './features/Catalog/Catalog'
|
6 |
|
|
import NotFound from './features/NotFound/NotFound'
|
7 |
ec88f816
|
Vaclav Honzik
|
|
8 |
c7d2ced1
|
Václav Honzík
|
const App = () => (
|
9 |
ec88f816
|
Vaclav Honzik
|
<div className="App">
|
10 |
c7d2ced1
|
Václav Honzík
|
<nav>
|
11 |
|
|
<Link to="/">Home</Link>
|
12 |
|
|
<Link to="/catalog">Catalog</Link>
|
13 |
|
|
</nav>
|
14 |
|
|
<Routes>
|
15 |
|
|
<Route path="/" element={ <Home /> } />
|
16 |
|
|
<Route path="/catalog" element={ <Catalog /> } />
|
17 |
|
|
<Route path="*" element={ <NotFound /> } />
|
18 |
|
|
</Routes>
|
19 |
ec88f816
|
Vaclav Honzik
|
</div>
|
20 |
c7d2ced1
|
Václav Honzík
|
)
|
21 |
ec88f816
|
Vaclav Honzik
|
|
22 |
c7d2ced1
|
Václav Honzík
|
export default App
|