+ {!token && <>Enter your email address and we'll send you instructions to reset your password.>} + {token && <>Create a new password for your account. Enter your new password below and confirm it to continue.>} +
+{error}
+ )} + + {message && ( +{message}
+ )} ++ Password Requirements +
+ ++ {error} +
++ {message} +
+ ++ Redirecting in {countdown}s... +
+{errors.password}
)} - {/* */} +{formErrorRef.current.message}
+{formErrorRef.current.message}
+ ); diff --git a/src/components/auth/RegisterForm.tsx b/src/components/auth/RegisterForm.tsx index 0c2f3f8..1470f79 100644 --- a/src/components/auth/RegisterForm.tsx +++ b/src/components/auth/RegisterForm.tsx @@ -16,7 +16,11 @@ interface FormDataState { lastName: string; } -const RegisterForm = ({ onSwitchToLogin }) => { +interface RegisterFormProps { + onSwitchToLogin: () => void +} + +const RegisterForm = ({ onSwitchToLogin }: RegisterFormProps) => { const formErrorRef = useRef<{ message: string; error: boolean }>({ message: "", error: false }); const [formData, setForm] = useState