doc: import BrowserRouter, Routes, and Route from react-router-dom, and import...
This commit is contained in:
1 parent
96a9bbdbb5
commit
065dd50d83
24 files changed
+576
-7
No files matched your search
+14
-2
@@ -1,8 +1,20 @@
|
||||
|
||||
import { BrowserRouter, Routes, Route } from 'react-router-dom';
|
||||
import { Box } from '@mui/material'
|
||||
import { Navbar, Feed, VideoDetail, ChannelDetail, SearchFeed } from './components';
|
||||
|
||||
function App() {
|
||||
return (
|
||||
<div>App</div>
|
||||
<BrowserRouter>
|
||||
<Box sx={{ backgroundColor: '#000'}}>
|
||||
<Navbar />
|
||||
<Routes>
|
||||
<Route path={'/'} exact element={<Feed />}/>
|
||||
<Route path={'/video/:id'} element={<VideoDetail />}/>
|
||||
<Route path={'/channel/:id'} element={<ChannelDetail />}/>
|
||||
<Route path={'/search/:searchTerm'} element={<SearchFeed />}/>
|
||||
</Routes>
|
||||
</Box>
|
||||
</BrowserRouter>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user