Update src/app/auth/register/page.tsx

This commit is contained in:
2026-03-11 20:26:09 +00:00
parent 709b6fb5ad
commit 326c9c2dc6

View File

@@ -40,7 +40,7 @@ export default function RegisterPage() {
throw new Error(data.message || "Registration failed");
}
router.push("/auth/login?registered=true");
await router.push("/auth/login?registered=true");
} catch (err: any) {
setError(err.message);
} finally {
@@ -166,7 +166,7 @@ export default function RegisterPage() {
<div className="flex gap-3">
<ButtonDirectionalHover
text={isLoading ? "Registrando..." : "Criar Conta"}
onClick={(e) => handleRegister(e as unknown as React.FormEvent)}
onClick={() => handleRegister(new Event('submit') as unknown as React.FormEvent)}
disabled={isLoading}
className="flex-1"
/>