- 링크결제 전화번호 입력 Number only
- 링크결제 신청 완료 페이지 결과 박스 제거 - 안면인증 테스트용 Mid 고정
This commit is contained in:
@@ -19,6 +19,11 @@ export const LinkPaymentStep2 = ({
|
||||
setProcessStep(ProcessStep.One);
|
||||
});
|
||||
|
||||
// 전화번호 형식 검증
|
||||
const isValidPhoneNumber = (phone: string) => {
|
||||
const phoneRegex = /^01[0|1|6|7|8|9][0-9]{7,8}$/;
|
||||
return phoneRegex.test(phone);
|
||||
};
|
||||
|
||||
const handleInputChange = (field: string, value: string) => {
|
||||
setFormData({ ...formData, [field]: value });
|
||||
@@ -74,10 +79,17 @@ export const LinkPaymentStep2 = ({
|
||||
<div className="issue-label wid-105">구매자<br />휴대폰 번호</div>
|
||||
<div className="issue-field">
|
||||
<input
|
||||
type="text"
|
||||
type="tel"
|
||||
placeholder="01012345678"
|
||||
value={formData.phoneNumber}
|
||||
onChange={(e) => handleInputChange('phoneNumber', e.target.value)}
|
||||
onChange={(e) => {
|
||||
const onlyNumbers = e.target.value.replace(/[^0-9]/g, '');
|
||||
handleInputChange('phoneNumber', onlyNumbers);
|
||||
}}
|
||||
className={formData.phoneNumber && !isValidPhoneNumber(formData.phoneNumber) ? 'error' : ''}
|
||||
inputMode="numeric"
|
||||
pattern="[0-9]*"
|
||||
maxLength={11}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -31,10 +31,10 @@ export const EmailBottomSheet = ({
|
||||
};
|
||||
|
||||
const onClickToRequest = () => {
|
||||
snackBar('정상 요청 되었습니다.', function(){
|
||||
sendRequest(userEmail);
|
||||
setTimeout(() => {
|
||||
onClickToClose();
|
||||
}, 2000);
|
||||
// sendRequest(userEmail);
|
||||
};
|
||||
|
||||
const downloadImage = () => {
|
||||
@@ -146,6 +146,7 @@ export const EmailBottomSheet = ({
|
||||
className="btn-50 btn-blue flex-1"
|
||||
type="button"
|
||||
onClick={ onClickToRequest }
|
||||
disabled={!optionsEmails || optionsEmails.length === 0}
|
||||
>{t('common.request')}</button>
|
||||
</div>
|
||||
</motion.div>
|
||||
|
||||
Reference in New Issue
Block a user