'use client' import { useState } from 'react' import { Button } from '~/components/ui/button' import { Spinner } from '~/components/ui/spinner' import { FormAlert } from '~/features/auth/form-alert' import { authClient } from '~/server/better-auth/client' export function VerifyEmailActions({ email }: { email?: string }) { const [status, setStatus] = useState<'idle' | 'sending' | 'sent' | 'error'>('idle') const resend = async () => { if (!email) return setStatus('sending') const { error } = await authClient.sendVerificationEmail({ email, callbackURL: '/' }) setStatus(error ? 'error' : 'sent') } return (
Didn't get anything? Check your spam folder or resend the link.