Add non-destructive dev seed on startup
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import Link from "next/link";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { auth } from "@/auth";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardDescription,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
|
||||
import { RegisterForm } from "./register-form";
|
||||
|
||||
export const metadata = { title: "Registrieren · Kita-Planer" };
|
||||
|
||||
export default async function RegisterPage() {
|
||||
const session = await auth();
|
||||
if (session?.user) {
|
||||
redirect(session.user.kitaId ? "/dashboard" : "/onboarding");
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-muted/30 px-4 py-12">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader className="space-y-2">
|
||||
<CardTitle>Kita kostenlos registrieren</CardTitle>
|
||||
<CardDescription>
|
||||
Lege deinen Account an. Im nächsten Schritt richtest du deine Kita ein.
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
<RegisterForm />
|
||||
<p className="text-center text-sm text-muted-foreground">
|
||||
Bereits einen Account?{" "}
|
||||
<Link href="/login" className="font-medium text-foreground underline">
|
||||
Anmelden
|
||||
</Link>
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user