import React, { useState } from 'react'; import { Button } from '../../ui/button'; import { XerticaLogo } from '../../brand/xertica-logo'; import { ImageWithFallback } from '../../figma/ImageWithFallback'; import { LanguageSelector } from '../../brand/language-selector'; import { ArrowLeft, Mail, CheckCircle2, Lock } from 'lucide-react'; import { useNavigate, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; /** * Email Verification Page component. * * @description * An informative screen shown after a password reset request. It instructs * the user to check their email and provides a "Resend email" feature. * Includes the same consistent layout with a hero image side-panel. * * @ai-rules * 1. Data Source: It retrieves the email from the router's `location.state`. * 2. Visual Feedback: Displays a temporary success message upon successful resale of the verification email. * 3. Navigation: Includes a link to return to the `LoginPage`. */ export function VerifyEmailPage() { const navigate = useNavigate(); const location = useLocation(); const { t } = useTranslation(); const email = location.state?.email || 'your@email.com'; const [isResending, setIsResending] = useState(false); const [resendSuccess, setResendSuccess] = useState(false); const handleResend = async () => { setIsResending(true); setResendSuccess(false); // Simulate email resending await new Promise(resolve => setTimeout(resolve, 1500)); setIsResending(false); setResendSuccess(true); // Remove success message after 3 seconds setTimeout(() => setResendSuccess(false), 3000); }; const handleSocialLogin = (_provider: string) => { // Wire your SSO/social provider integration here }; return (
{/* Left side - Full background image */}
{/* Background image filling all space */} {/* Gradient overlay */}
{/* Right side - Content */}
{/* Language selector in the top right corner */}
{/* Mobile background gradient */}
{/* Form header */}
{/* Email icon */}

{t('verifyEmail.heading')}

{t('verifyEmail.instructionsSent')}

{email}

{/* Instructions */}

{t('verifyEmail.instructions')}

{t('verifyEmail.checkSpam')}
{/* Success message on resend */} {resendSuccess && (
{t('verifyEmail.resentSuccess')}
)} {/* Action buttons */}

{t('verifyEmail.notReceived')}

{/* Divider */}
{t('login.orContinueWith')}
{/* Social/SSO login options */}
{/* Google */} {/* MT Login */} {/* gov.br */}
); }