change role to "user" for new registrations, fixed some registration form errors and implemented a reg-test

This commit is contained in:
Codex Agent
2025-10-02 15:06:50 +02:00
parent 7475210893
commit 1845d83583
13 changed files with 416 additions and 191 deletions

View File

@@ -9,13 +9,26 @@ import { Button } from '@/components/ui/button';
import AuthLayout from '@/layouts/auth-layout';
export default function VerifyEmail({ status }: { status?: string }) {
const isNewRegistration = status === 'registration-success';
const description = isNewRegistration
? 'Thanks! Please confirm your email address to access your dashboard.'
: 'Please verify your email address by clicking on the link we just emailed to you.';
return (
<AuthLayout title="Verify email" description="Please verify your email address by clicking on the link we just emailed to you.">
<AuthLayout title="Verify email" description={description}>
<Head title="Email verification" />
{isNewRegistration && (
<div className="mb-6 rounded-md bg-blue-50 p-4 text-left text-sm text-blue-900">
<p className="font-semibold">Almost there! Confirm your email address to start using Fotospiel.</p>
<p className="mt-2">We just sent a confirmation message to your inbox. As soon as you click the link you will be taken straight to your dashboard.</p>
<p className="mt-2">Can't find it? Check your spam folder or request a new link below.</p>
</div>
)}
{status === 'verification-link-sent' && (
<div className="mb-4 text-center text-sm font-medium text-green-600">
A new verification link has been sent to the email address you provided during registration.
We have sent the verification link again. Please also check your spam folder.
</div>
)}