We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a7155 commit 4547418Copy full SHA for 4547418
src/pages/auth/LoginPage.tsx
@@ -1,4 +1,4 @@
1
-import { useState } from 'react';
+import { useEffect, useState } from 'react';
2
import type { SubmitHandler } from 'react-hook-form';
3
import { useForm, useWatch } from 'react-hook-form';
4
import { useNavigate } from 'react-router-dom';
@@ -68,6 +68,10 @@ export default function Login() {
68
window.location.href = `${baseUrl}`;
69
};
70
71
+ useEffect(() => {
72
+ setError('');
73
+ }, [watchedEmail, watchedPassword]);
74
+
75
return (
76
<div className="min-w-[280px] w-[450px] max-w-[96vw] h-screen flex flex-col items-center justify-center gap-10">
77
<form className="flex-col flex items-center justify-center w-full gap-14" onSubmit={handleSubmit(onSubmit)}>
0 commit comments