recatfor
This commit is contained in:
parent
8e365867bd
commit
74c66e74c9
13 changed files with 363 additions and 112 deletions
11
src/App.tsx
11
src/App.tsx
|
@ -1,13 +1,20 @@
|
|||
import { BrowserRouter, Route, Routes } from 'react-router'
|
||||
import HomePage from './pages/HomePage.tsx'
|
||||
import { PostsService } from './model/posts/postsService.ts'
|
||||
import AuthorPage from './pages/AuthorPage.tsx'
|
||||
import { MediaService } from './pages/mediaService.ts'
|
||||
|
||||
function App() {
|
||||
const postService = new PostsService()
|
||||
const mediaService = new MediaService()
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Routes>
|
||||
<Route path={'/'} element={<HomePage />} />
|
||||
<Route path="/u/:username" element={<AuthorPage />} />
|
||||
<Route
|
||||
path={'/'}
|
||||
element={<HomePage postsService={postService} mediaService={mediaService} />}
|
||||
/>
|
||||
<Route path="/u/:username" element={<AuthorPage postsService={postService} />} />
|
||||
</Routes>
|
||||
</BrowserRouter>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue