buttons
This commit is contained in:
parent
abd7c2f073
commit
384da1e832
18 changed files with 150 additions and 116 deletions
13
src/App.tsx
13
src/App.tsx
|
@ -9,7 +9,6 @@ import { AuthService } from './app/auth/authService.ts'
|
|||
import { useUser } from './app/user/userStore.ts'
|
||||
import LogoutPage from './app/auth/pages/LogoutPage.tsx'
|
||||
import UnauthorizedHandler from './app/auth/components/UnauthorizedHandler.tsx'
|
||||
import Protected from './app/auth/components/Protected.tsx'
|
||||
|
||||
function App() {
|
||||
const { user } = useUser()
|
||||
|
@ -21,13 +20,11 @@ function App() {
|
|||
<BrowserRouter>
|
||||
<UnauthorizedHandler>
|
||||
<Routes>
|
||||
<Route element={<Protected />}>
|
||||
<Route
|
||||
path={'/'}
|
||||
element={<HomePage postsService={postService} mediaService={mediaService} />}
|
||||
/>
|
||||
<Route path="/u/:username" element={<AuthorPage postsService={postService} />} />
|
||||
</Route>
|
||||
<Route
|
||||
path={'/'}
|
||||
element={<HomePage postsService={postService} mediaService={mediaService} />}
|
||||
/>
|
||||
<Route path="/u/:username" element={<AuthorPage postsService={postService} />} />
|
||||
<Route path="/login" element={<LoginPage authService={authService} />} />
|
||||
<Route path="/logout" element={<LogoutPage authService={authService} />} />
|
||||
<Route path="/signup/:code?" element={<SignupPage authService={authService} />} />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue