import type { ReactNode } from "react"; import { getNotifyPrefs, isSuperadmin } from "@peppa/core"; import { db } from "@/lib/db"; import { requireUser } from "@/lib/auth"; import { navCounts } from "@/lib/queries"; import { Sidebar } from "@/components/Sidebar"; import { AttentionBadge } from "@/components/AttentionBadge"; export const dynamic = "force-dynamic"; /** Console layout (PEP-38): navigation on the left, each page renders centre + right panel via . */ export default async function AppLayout({ children }: { children: ReactNode }) { const user = await requireUser(); const counts = await navCounts(user.id); const { sound } = await getNotifyPrefs(db, user.id); return (
{children}
); }