From b4c526bf9f527e4c8766efb60298c8a835b889ca Mon Sep 17 00:00:00 2001 From: yiekheng Date: Sun, 3 May 2026 08:31:00 +0800 Subject: [PATCH] feat(web): nav account menu with sign out + passkey settings link --- web/app/layout.tsx | 10 ++-- web/components/nav.tsx | 116 +++++++++++++++++++++++++++++++++++------ 2 files changed, 103 insertions(+), 23 deletions(-) diff --git a/web/app/layout.tsx b/web/app/layout.tsx index 5e273fd..f9fbed0 100644 --- a/web/app/layout.tsx +++ b/web/app/layout.tsx @@ -2,6 +2,7 @@ import "./globals.css"; import type { Metadata, Viewport } from "next"; import Nav from "@/components/nav"; import AutoRefresh from "@/components/auto-refresh"; +import { getSession } from "@/lib/auth"; export const metadata: Metadata = { title: "CM Bot V2", @@ -10,22 +11,19 @@ export const metadata: Metadata = { export const viewport: Viewport = { themeColor: "#18181b", - // Lets the page draw under the iPhone notch / Dynamic Island when the - // PWA runs in standalone mode. Components that pin to the edges (Nav, - // Toast) read env(safe-area-inset-*) to keep their content out of the - // hardware cutouts. viewportFit: "cover", }; -export default function RootLayout({ +export default async function RootLayout({ children, }: { children: React.ReactNode; }) { + const session = await getSession(); return ( -