cx-nexredirect/app/(auth)/layout.tsx

8 lines
245 B
TypeScript
Raw Normal View History

import { redirect } from "next/navigation";
import { isSetupComplete } from "@/lib/db";
export default function AuthLayout({ children }: { children: React.ReactNode }) {
if (!isSetupComplete()) redirect("/setup");
return <>{children}</>;
}