()
| 27 | } |
| 28 | |
| 29 | const checkStatus = async () => { |
| 30 | try { |
| 31 | const res = await subdomainAPI.post('/auth/email/status', { email }); |
| 32 | if (res.exists && res.isVerified) { |
| 33 | toast({ |
| 34 | title: "Already Verified", |
| 35 | description: "This email is already verified. Please login.", |
| 36 | }); |
| 37 | navigate('/login'); |
| 38 | } |
| 39 | } catch (err) { |
| 40 | console.error('Status check failed:', err); |
| 41 | } |
| 42 | }; |
| 43 | |
| 44 | checkStatus(); |
| 45 | }, [email, navigate, toast]); |