-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: separate diff pages to diff file
- Loading branch information
1 parent
5eb1ccd
commit 25fa5a1
Showing
2 changed files
with
63 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import type { ChangeEvent } from "react"; | ||
import style from "./Auth.module.scss"; | ||
|
||
type LoginPageProps = { | ||
onDeviceIdChange: (e: ChangeEvent<HTMLInputElement>) => void; | ||
onPinChange: (e: ChangeEvent<HTMLInputElement>) => void; | ||
onSubmitHandler: () => void; | ||
errorMessage: string; | ||
}; | ||
|
||
export const LoginPage = ({ | ||
onDeviceIdChange, | ||
onPinChange, | ||
onSubmitHandler, | ||
errorMessage, | ||
}: LoginPageProps) => ( | ||
<div className={style.modalWrapper}> | ||
<div className={style.modalContainer}> | ||
<h1 className={style.modalTitle}> Zabo Board Login</h1> | ||
<br /> | ||
<p className={style.modalContent}> | ||
Zabo Board 서비스를 이용하기 위해서는 등록된 device Id와 PIN을 | ||
입력하세요. | ||
<br /> | ||
Zabo Board 서비스를 등록하기 위해서는 zabo.sparcs.org 채널톡으로 | ||
문의해주세요. | ||
</p> | ||
<div className={style.form}> | ||
<label className={style.input}> | ||
device Id | ||
<input | ||
className={style.input} | ||
name="deviceId" | ||
onChange={onDeviceIdChange} | ||
/> | ||
</label> | ||
<label className={style.input}> | ||
PIN | ||
<input | ||
className={style.input} | ||
type="password" | ||
name="PIN" | ||
onChange={onPinChange} | ||
/> | ||
</label> | ||
</div> | ||
<button type="submit" className={style.submit} onClick={onSubmitHandler}> | ||
Submit | ||
</button> | ||
<div className={style.errorBox}>{errorMessage}</div> | ||
</div> | ||
</div> | ||
); |