SPB Git

Repository Public

layout.tsx 538 B 13 lines tsx

1import { cookies } from "next/headers";2import { redirect } from "next/navigation";3import { checkSession, COOKIE } from "@/server/auth";4import { Shell } from "@/components/shell";56export const dynamic = "force-dynamic";78// Every page of the application sits behind a valid session (the proxy only checks that a cookie exists).9export default async function TvLayout({ children }: { children: React.ReactNode }) {10  if (!checkSession((await cookies()).get(COOKIE)?.value)) redirect("/connexion");11  return <Shell>{children}</Shell>;12}13
Files main
Menu

Theme