From 1565eae50af8cbf916bf6a18314adc553838fbcb Mon Sep 17 00:00:00 2001 From: Daeeui Kim Date: Tue, 23 Jul 2024 20:40:42 +0900 Subject: [PATCH] =?UTF-8?q?feat;=20isFormError=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EA=B0=92=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/Auth/Login/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/page/Auth/Login/index.tsx b/src/page/Auth/Login/index.tsx index dfdf239c..58c7dacd 100644 --- a/src/page/Auth/Login/index.tsx +++ b/src/page/Auth/Login/index.tsx @@ -38,14 +38,17 @@ export default function Login() { const onSubmit: SubmitHandler = async (data) => { if (data.account === '') { setLoginError('전화번호를 입력해주세요.'); + setIsFormError(true); return; } if (data.password === '') { setLoginError('비밀번호를 입력해주세요.'); + setIsFormError(true); return; } if (!/^[0-9]*$/.test(data.account)) { setLoginError('올바른 전화번호 형식이 아닙니다.'); + setIsFormError(true); return; } const hashedPassword = await sha256(data.password);