From 663753ac1ab79fa645f8684803f32c502449eddb Mon Sep 17 00:00:00 2001 From: younghyun753 Date: Mon, 14 Oct 2024 00:56:35 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=EC=97=94=ED=84=B0=20=EB=88=84?= =?UTF-8?q?=EB=A5=BC=20=EA=B2=BD=EC=9A=B0=20=ED=9A=8C=EC=9B=90=EA=B0=80?= =?UTF-8?q?=EC=9E=85=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=8B=A4=EC=8B=9C=20?= =?UTF-8?q?=EB=B2=97=EC=96=B4=EB=82=98=EA=B2=8C=20=EB=90=98=EB=8A=94=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20(#83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/auth/signup/page.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/app/auth/signup/page.tsx b/src/app/auth/signup/page.tsx index 006c935..25b9cc0 100644 --- a/src/app/auth/signup/page.tsx +++ b/src/app/auth/signup/page.tsx @@ -26,6 +26,14 @@ const SignUpPage = () => { checkStudentIdDuplicate, } = AuthService(); + + // 엔터키를 누를 때 기본 동작을 방지하는 함수 + const handleKeyDown = (e) => { + if (e.key === "Enter") { + e.preventDefault(); // 엔터키의 기본 동작 방지 + } + }; + // 이메일 중복 및 형식 검사 const handleEmailBlur = async (e: React.FocusEvent) => { const email = e.target.value; @@ -277,6 +285,7 @@ const SignUpPage = () => { required: "아이디를 입력해주세요", })} onBlur={handleEmailBlur} + onKeyDown={handleKeyDown} /> {errors.email && (

{errors.email.message}

@@ -305,6 +314,7 @@ const SignUpPage = () => { "비밀번호를 8~16자로 영문, 숫자, 특수기호를 조합해서 사용하세요. ", }, })} + onKeyDown={handleKeyDown} />