Skip to content

Commit d2f99c4

Browse files
authored
Merge pull request #169 from pirogramming/main
엔터시 로그인기능 추가
2 parents 96ae0f9 + b8da5aa commit d2f99c4

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

frontend/src/Login.jsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,14 @@ const Login = () => {
5757

5858
return (
5959
<div className={styles.login_container}>
60-
<div className={styles.login}>
60+
<div
61+
className={styles.login}
62+
onKeyDown={(e) => {
63+
if (e.key === "Enter" && name && password) {
64+
handleLogin();
65+
}
66+
}}
67+
>
6168
<h1 className={styles.pirocheck}>PIROCHECK</h1>
6269

6370
<InputBlock
@@ -71,7 +78,7 @@ const Login = () => {
7178
placeholder: "비밀번호",
7279
},
7380
]}
74-
values={[name, password]} // InputBlock props 수정에 따라 추가
81+
values={[name, password]}
7582
onChange={handleChange}
7683
/>
7784
<div className={styles.errorWrapper}>

0 commit comments

Comments
 (0)