Add auth-aware navbar to landing page
- Extract navbar into separate client component (navbar.tsx) with useSession hook - When authenticated: show "Go to App" button linking to /app - When unauthenticated: show "Log in" and "Get Started" buttons - Add SessionProvider to public layout to enable auth hooks - Create session-provider wrapper component to separate concerns (metadata exports still work) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
09facbce69
commit
d0ebf677f3
5 changed files with 59 additions and 20 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import type { Metadata } from "next";
|
||||
import { SessionProviderClient } from "./session-provider";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Candle Annotator",
|
||||
|
|
@ -10,5 +11,9 @@ export default function PublicLayout({
|
|||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return children;
|
||||
return (
|
||||
<SessionProviderClient>
|
||||
{children}
|
||||
</SessionProviderClient>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue