import { redirect } from "next/navigation"; import { getCurrentUser } from "@/lib/auth/session"; export const dynamic = "force-dynamic"; export default async function AdminLayout({ children, }: { children: React.ReactNode; }) { const user = await getCurrentUser(); if (!user || !user.is_admin) { redirect("/dashboard"); } return (