This commit is contained in:
john 2025-05-04 23:22:45 +02:00
parent 8e365867bd
commit 74c66e74c9
13 changed files with 363 additions and 112 deletions

View file

@ -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>
)