"use client"; import * as React from "react"; import Link from "next/link"; import { AlertTriangle, MailCheck } from "lucide-react"; import { Field, Input } from "@/components/ui/input"; import { AuthCard } from "./auth-card"; import { ResendVerification } from "./resend-verification"; import { humanAuthError, isValidEmail } from "./auth-errors"; export function VerifyEmailView({ initialEmail, errorCode }: { initialEmail: string; errorCode: string | null }) { const [email, setEmail] = React.useState(initialEmail); const valid = isValidEmail(email); const failed = !!errorCode; return ( : } title={failed ? "That link didn't work" : "Verify your email"} description={ failed ? humanAuthError({ code: errorCode ?? undefined }, "verify") : initialEmail ? ( <> We sent a verification link to {initialEmail}. Open it to activate your account. Links are valid for 24 hours. ) : "Your account needs a verified email before you can sign in. Check your inbox for the link we sent when you signed up, or request a new one below." } footer={ <> Already verified?{" "} Sign in } >
e.preventDefault()} noValidate className="space-y-4" > setEmail(e.target.value)} placeholder="you@company.com" autoFocus={!initialEmail} />

Nothing after a minute? Check your spam folder. Verification emails come from PolyLLM.

); }