| 90 | }; |
| 91 | |
| 92 | const handleResend = async () => { |
| 93 | if (!captchaToken) { |
| 94 | toast({ |
| 95 | variant: "destructive", |
| 96 | title: "Verification Required", |
| 97 | description: "Please complete the CAPTCHA verification to resend.", |
| 98 | }); |
| 99 | return; |
| 100 | } |
| 101 | |
| 102 | setIsResending(true); |
| 103 | try { |
| 104 | await subdomainAPI.post('/auth/email/resend-verification', { email, captchaToken }); |
| 105 | toast({ |
| 106 | title: "Code Resent", |
| 107 | description: "Check your inbox for a new verification code.", |
| 108 | }); |
| 109 | } catch (err) { |
| 110 | toast({ |
| 111 | variant: "destructive", |
| 112 | title: "Failed to Resend", |
| 113 | description: err.data?.error || "Please try again later.", |
| 114 | }); |
| 115 | } finally { |
| 116 | setIsResending(false); |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | return ( |
| 121 | <div className="min-h-screen flex flex-col items-center justify-center bg-[#FFF8F0] px-4 font-sans" style={{ paddingTop: 'var(--incident-height, 0px)' }}> |