tenantpilot/app/(auth)/layout.tsx
2025-11-18 23:24:41 +01:00

14 lines
348 B
TypeScript

import { getUserAuth } from "@/lib/auth/utils";
import { redirect } from "next/navigation";
export default async function AuthLayout({
children,
}: {
children: React.ReactNode;
}) {
const session = await getUserAuth();
if (session?.session) redirect("/dashboard");
return ( <div className="bg-muted h-screen pt-8">{children}</div> );
}