import { getServerSession } from "next-auth"; import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { FormLayoutClient } from "./client"; import LoginDialog from "@/components/login-dialog"; export default async function FormLayout({ children, }: { children: React.ReactNode; }) { const session = await getServerSession(authOptions); return (
Forms {session?.user && ( )}
{children}
{!session && }
); }