Skip to content

Commit 6d9acb5

Browse files
committed
Fix navbar when logged out
1 parent b219c3b commit 6d9acb5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

frontend/app/layout.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ export default function RootLayout({
4040
disableTransitionOnChange
4141
>
4242
<AuthProvider>
43-
<AuthPageWrapper>
44-
<Navbar />
45-
{children}
46-
</AuthPageWrapper>
43+
<Navbar />
44+
<AuthPageWrapper>{children}</AuthPageWrapper>
4745
</AuthProvider>
4846
<Toaster />
4947
</ThemeProvider>

frontend/components/navbar.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export function Navbar() {
2222

2323
const isActive = (path: string) => pathname === path;
2424

25+
if (!auth?.user) {
26+
return;
27+
}
28+
2529
return (
2630
<nav className="bg-background border-b">
2731
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">

0 commit comments

Comments
 (0)