-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from Choi-Jinwook/feat/mypage
Fix: 마이페이지 피드백 반영 및 인증번호 로직 수정
- Loading branch information
Showing
5 changed files
with
86 additions
and
62 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
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,52 @@ | ||
import exp from "constants"; | ||
import { useState } from "react"; | ||
import { checkAuthNumValidation } from "@shared/utils"; | ||
import InputWithLabel from "./InputWithLabel"; | ||
import TimerWithButton from "./TimerWithButton"; | ||
|
||
interface AuthNumberInputProps { | ||
inputContainerStyle: string; | ||
isDonePhoneInput: boolean; | ||
callType: "signup" | "findidpw"; | ||
inputStyle: string; | ||
labelStyle: string; | ||
buttonStyle: string; | ||
} | ||
|
||
const AuthNumberInput = ({ | ||
inputContainerStyle, | ||
isDonePhoneInput, | ||
callType, | ||
inputStyle, | ||
labelStyle, | ||
buttonStyle, | ||
}: AuthNumberInputProps) => { | ||
const [value, setValue] = useState(""); | ||
const isValidate = checkAuthNumValidation(value); | ||
|
||
return ( | ||
<> | ||
<div className={`${inputContainerStyle}`}> | ||
<InputWithLabel | ||
maxLength={6} | ||
pattern="\d*" | ||
label="휴대폰으로 전송된 인증코드를 입력해주세요." | ||
id="authNum" | ||
inputType="text" | ||
labelStyle={`${labelStyle}`} | ||
inputStyle={`w-full ${inputStyle}`} | ||
placeholder="인증번호 6자리 입력" | ||
onChange={({ target: { value } }) => setValue(value)} | ||
/> | ||
</div> | ||
<TimerWithButton | ||
isDonePhoneInput={isDonePhoneInput} | ||
isAuthNumValidate={isValidate} | ||
callType={callType} | ||
buttonStyle={buttonStyle} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export default AuthNumberInput; |
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