diff --git a/src/app/(auth)/layout.tsx b/src/app/(auth)/layout.tsx new file mode 100644 index 0000000..8dae4d8 --- /dev/null +++ b/src/app/(auth)/layout.tsx @@ -0,0 +1,41 @@ +import Image from "next/image"; +import { auth } from "@/lib/auth"; +import { Code } from "lucide-react"; +import { redirect } from "next/navigation"; + +interface AuthLayoutProps { + children: React.ReactNode; +} + +export default async function AuthLayout({ + children +}: AuthLayoutProps) { + const session = await auth(); + if (session) redirect("/"); + + return ( +