SPB Git
414 B · 17 lines tsx
1import { redirect } from "next/navigation";2import { getSession } from "@/lib/auth";3import { AppShell } from "@/components/app-shell";4import { Toaster } from "@/components/ui";567export default async function AppLayout({ children }: { children: React.ReactNode }) {8  const s = await getSession();9  if (!s) redirect("/login");10  return (11    <AppShell>12      {children}13      <Toaster />14    </AppShell>15  );16}17
Files · 66af8bfc031fad4ebd89e721b6d66962e2525f4d
Menu

Theme