import { getServerSession } from "next-auth/next"; import { authOptions } from "@/lib/auth-config"; import { redirect } from "next/navigation"; import DashboardNav from "./DashboardNav"; export const dynamic = "force-dynamic"; export default async function DashboardLayout({ children }: { children: React.ReactNode }) { const session = await getServerSession(authOptions); if (!session?.user) redirect("/login"); return (