diff --git a/src/pages/Register.tsx b/src/pages/Register.tsx index a36e7c5..2c298ac 100644 --- a/src/pages/Register.tsx +++ b/src/pages/Register.tsx @@ -8,9 +8,6 @@ export function Register() { const [password, setPassword] = useState('') const [error, setError] = useState('') const [loading, setLoading] = useState(false) - const [registrationComplete, setRegistrationComplete] = useState(false) - const [resendLoading, setResendLoading] = useState(false) - const [resendMessage, setResendMessage] = useState('') async function handleSubmit(e: React.FormEvent) { e.preventDefault() @@ -38,7 +35,7 @@ export function Register() { throw new Error(authError.message ?? 'Registration failed') } - setRegistrationComplete(true) + setError('Account created! Please sign in.') } catch { setError('Registration failed. Please try again.') } finally { @@ -46,49 +43,6 @@ export function Register() { } } - async function handleResendVerification() { - setResendLoading(true) - setResendMessage('') - try { - const { error } = await authClient.sendVerificationEmail({ email }) - if (error) { - setResendMessage('Failed to resend. Please try again.') - } else { - setResendMessage('Verification email sent!') - } - } finally { - setResendLoading(false) - } - } - - if (registrationComplete) { - return ( -
-

Check your email

-

- We sent a verification link to {email}. Click it to activate your account. -

- - {resendMessage && ( -

{resendMessage}

- )} -

- Already have an account?{' '} - - Sign in - -

-
- ) - } - return (

Create Account