Repository Public
1import { redirect } from "next/navigation";2import { getUser } from "@/lib/session";3import { AppShell } from "@/components/shell";45/** Everything under (app) requires a session. The API enforces the same rule on its own; this is navigation only. */6export default async function AppLayout({ children }: { children: React.ReactNode }) {7 const u = await getUser();8 if (!u) redirect("/login");9 return <AppShell csrfToken={u.csrfToken} me={{ id: u.userId, email: u.email, displayName: u.displayName, role: u.role, isOwner: u.isOwner, locale: u.locale, accent: u.accent }}>{children}</AppShell>;10}11