Skip to content

Commit

Permalink
Show navbar only when logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
cheehongw committed Nov 15, 2023
1 parent 10b2e64 commit 28e1e09
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,16 @@ function App() {
const finalRoutes = loggedInRoutes.concat(isAuthenticated && isAdmin ? adminOnlyRoutes : [])

const router = createBrowserRouter([
{

isAuthenticated ? {
Component: NavbarWrapper,
children: isAuthenticated ? finalRoutes : publicRoutes,
},
children: finalRoutes,
} : {
children: publicRoutes
}


,
{ path: "*", Component: PageNotFound },
]);

Expand Down

0 comments on commit 28e1e09

Please sign in to comment.