|
|
|
@ -28,13 +28,21 @@ export const AccountRegisterForm = ({
|
|
|
|
|
testName, |
|
|
|
|
setMemberName |
|
|
|
|
}) => { |
|
|
|
|
// 약관동의 내용
|
|
|
|
|
const { agreeTerms } = useSelector(state => state.accountState); |
|
|
|
|
// 분단위 카운터
|
|
|
|
|
const [minutes_Counter, setMinutes_Counter] = useState('03'); |
|
|
|
|
// 초단위 카운터
|
|
|
|
|
const [seconds_Counter, setSeconds_Counter] = useState('00'); |
|
|
|
|
// 타이머
|
|
|
|
|
const [timer, setTimer] = useState(null); |
|
|
|
|
// 타이머 시작 여부
|
|
|
|
|
const [isRunning, setIsRunning] = useState(false); |
|
|
|
|
// 인증번호 발송 횟수
|
|
|
|
|
const [sendCount, setSendCount] = useState(0); |
|
|
|
|
// 인증번호 발송 여부
|
|
|
|
|
const [isCrtfy, setIsCrtfy] = useState(false); |
|
|
|
|
// 모달 상태
|
|
|
|
|
const [modal, setModal] = useState({ |
|
|
|
|
isOpen: false, |
|
|
|
|
title: '', |
|
|
|
@ -42,6 +50,7 @@ export const AccountRegisterForm = ({
|
|
|
|
|
}); |
|
|
|
|
const dispatch = useDispatch(); |
|
|
|
|
|
|
|
|
|
// 타이머 시작
|
|
|
|
|
const timerStart = count => { |
|
|
|
|
let minutes, seconds; |
|
|
|
|
|
|
|
|
@ -70,6 +79,7 @@ export const AccountRegisterForm = ({
|
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 인증번호 발송하기 헨들러
|
|
|
|
|
const handlerSmsSend = async () => { |
|
|
|
|
const vData = getValues(); |
|
|
|
|
|
|
|
|
@ -132,6 +142,7 @@ export const AccountRegisterForm = ({
|
|
|
|
|
// handlerSmsSend();
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 인증번호 인증 헨들러
|
|
|
|
|
useEffect(() => { |
|
|
|
|
if (isRunning) { |
|
|
|
|
clearInterval(timer); |
|
|
|
@ -144,6 +155,7 @@ export const AccountRegisterForm = ({
|
|
|
|
|
}; |
|
|
|
|
}, []); |
|
|
|
|
|
|
|
|
|
// 회원가입 폼 유효성 검사
|
|
|
|
|
const SignupSchema = yup.object().shape({ |
|
|
|
|
userId: yup.string().trim().required('ID를 입력해 주세요.'), |
|
|
|
|
// .matches(
|
|
|
|
@ -206,10 +218,12 @@ export const AccountRegisterForm = ({
|
|
|
|
|
resolver: yupResolver(SignupSchema) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 취소 헨들러
|
|
|
|
|
const handlerCancel = async () => { |
|
|
|
|
movePage('/account/login'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 회원가입 버튼 헨들러
|
|
|
|
|
const onSubmit = async data => { |
|
|
|
|
if (isObjEmpty(errors)) { |
|
|
|
|
if (!isCrtfy) { |
|
|
|
@ -250,6 +264,7 @@ export const AccountRegisterForm = ({
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 인증번호 인증 헨들러
|
|
|
|
|
const handlerSmsConfirm = async () => { |
|
|
|
|
const vData = getValues(); |
|
|
|
|
|
|
|
|
@ -288,6 +303,8 @@ export const AccountRegisterForm = ({
|
|
|
|
|
let hpno = ''; |
|
|
|
|
let brthdyDate = ''; |
|
|
|
|
let trmnlId = ''; |
|
|
|
|
|
|
|
|
|
// 회원가입 폼 변경 헨들러
|
|
|
|
|
const onChangeHandler = e => { |
|
|
|
|
const { name, value } = e.target; |
|
|
|
|
|
|
|
|
|