From e22300b30e5266acb8c210d919c277d1caf54d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=8A=B9=EC=9A=B0?= Date: Mon, 19 Feb 2024 20:27:17 +0900 Subject: [PATCH] =?UTF-8?q?feature-051,054:=20Enter=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=EC=9D=B4=20=EB=90=98=EB=A9=B4=20=ED=81=B4=EB=A6=AD=20=EC=9D=B4?= =?UTF-8?q?=EB=B2=A4=ED=8A=B8=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SignInPage.tsx | 11 +++++++++++ src/pages/SignUpPage.tsx | 16 +++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/pages/SignInPage.tsx b/src/pages/SignInPage.tsx index b5a94e8..77425b3 100644 --- a/src/pages/SignInPage.tsx +++ b/src/pages/SignInPage.tsx @@ -81,6 +81,16 @@ const SignInPage: React.FC = () => { } }; + const handleOnKeyDown = (e: React.KeyboardEvent) => { + if (e.key === 'Enter') { + handleOnClick(); // Enter 입력이 되면 클릭 이벤트 실행 + } + }; + + const handleOnClick = () => { + handleClickLoginButton(); + } + const redirect_uri = `${location.origin}/social-account`; //Redirect URI const KAKAO_KEY = '77ddf1baeb87f4a9752ed437db43cd96'; //kakao REST API KEY const NAVER_CLIENT_ID = 'qR4Npp1ui69SCF6nAJd2'; @@ -182,6 +192,7 @@ const SignInPage: React.FC = () => { placeholder="비밀번호를 입력해주세요." name="password" value={loginInfo.password} + onKeyDown={handleOnKeyDown} />