import { isAuthenticated } from "@/lib/auth"; import { redirect } from "next/navigation"; import { Navbar } from "@/components/ui/Navbar"; export default async function ProtectedLayout({ children, }: { children: React.ReactNode; }) { const authed = await isAuthenticated(); if (!authed) { redirect("/login"); } return (
{children}
); }