Skip to content

Commit 4547418

Browse files
committed
feat: 유효성 검사 수정
1 parent 07a7155 commit 4547418

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pages/auth/LoginPage.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from 'react';
1+
import { useEffect, useState } from 'react';
22
import type { SubmitHandler } from 'react-hook-form';
33
import { useForm, useWatch } from 'react-hook-form';
44
import { useNavigate } from 'react-router-dom';
@@ -68,6 +68,10 @@ export default function Login() {
6868
window.location.href = `${baseUrl}`;
6969
};
7070

71+
useEffect(() => {
72+
setError('');
73+
}, [watchedEmail, watchedPassword]);
74+
7175
return (
7276
<div className="min-w-[280px] w-[450px] max-w-[96vw] h-screen flex flex-col items-center justify-center gap-10">
7377
<form className="flex-col flex items-center justify-center w-full gap-14" onSubmit={handleSubmit(onSubmit)}>

0 commit comments

Comments
 (0)