diff --git a/package-lock.json b/package-lock.json index 63420d9..0416558 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@testing-library/user-event": "^13.5.0", "antd": "^4.18.2", "axios": "^0.24.0", - "gosrock-storybook": "^1.4.7", + "gosrock-storybook": "^1.4.10", "moment": "^2.29.1", "qrcode.react": "^1.0.1", "react": "^17.0.2", @@ -7127,9 +7127,9 @@ } }, "node_modules/gosrock-storybook": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/gosrock-storybook/-/gosrock-storybook-1.4.7.tgz", - "integrity": "sha512-GzSIR0TeJBDY5HsFwfoVTGPwm2vfjcuth64UHUE3PSuukuxok48fHPjRmzu3M/h5nu5DF46aK68on9A+WBtIPA==", + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/gosrock-storybook/-/gosrock-storybook-1.4.10.tgz", + "integrity": "sha512-MLTO1K/zouPcZd4lZfbmdeLpYpPhqIv7dmx+jxdpP01X4G2fjth+nW5tD9Kpshiw1p4q32xt9ZhqOyrOENvzvw==", "dependencies": { "@babel/runtime": "^7.16.5" }, @@ -21058,9 +21058,9 @@ } }, "gosrock-storybook": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/gosrock-storybook/-/gosrock-storybook-1.4.7.tgz", - "integrity": "sha512-GzSIR0TeJBDY5HsFwfoVTGPwm2vfjcuth64UHUE3PSuukuxok48fHPjRmzu3M/h5nu5DF46aK68on9A+WBtIPA==", + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/gosrock-storybook/-/gosrock-storybook-1.4.10.tgz", + "integrity": "sha512-MLTO1K/zouPcZd4lZfbmdeLpYpPhqIv7dmx+jxdpP01X4G2fjth+nW5tD9Kpshiw1p4q32xt9ZhqOyrOENvzvw==", "requires": { "@babel/runtime": "^7.16.5" } diff --git a/package.json b/package.json index f27c822..b42cf3a 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "@testing-library/user-event": "^13.5.0", "antd": "^4.18.2", "axios": "^0.24.0", - "gosrock-storybook": "^1.4.7", + "gosrock-storybook": "^1.4.10", "moment": "^2.29.1", "qrcode.react": "^1.0.1", "react": "^17.0.2", diff --git a/src/components/MessageValidationProcess/SendMessagePage/SendMessagePage.js b/src/components/MessageValidationProcess/SendMessagePage/SendMessagePage.js index 71d2996..fe57092 100644 --- a/src/components/MessageValidationProcess/SendMessagePage/SendMessagePage.js +++ b/src/components/MessageValidationProcess/SendMessagePage/SendMessagePage.js @@ -30,6 +30,10 @@ function SendMessagePage({ ...props }) { const frontButtonHandler = () => { console.log(phoneNumber); + if (phoneNumber === null || phoneNumber.length !== 11) { + alert('휴대폰 번호 11자리를 제대로 입력 해주세요'); + return; + } dispatch(messageSend({ phoneNumber })); }; diff --git a/src/components/MessageValidationProcess/SendValidationNumberPage/SendValidationNumberPage.js b/src/components/MessageValidationProcess/SendValidationNumberPage/SendValidationNumberPage.js index 57f869b..f308585 100644 --- a/src/components/MessageValidationProcess/SendValidationNumberPage/SendValidationNumberPage.js +++ b/src/components/MessageValidationProcess/SendValidationNumberPage/SendValidationNumberPage.js @@ -23,12 +23,13 @@ function SendValidationNumberPage({ ...props }) { const dispatch = useDispatch(); - const { - messageToken, - errorMessage, - pending, - validationNumber: reducerValidationNumber - } = useSelector(state => state.messageSend); + const { messageToken, validationNumber: reducerValidationNumber } = + useSelector(state => state.messageSend); + + const { errorMessage, pending } = useSelector(state => state.auth); + //processForValidationNextPage 는 메시지 인증하는 프로세스가 두가지의 단계 , + //즉 티켓 예매하는 단계와 내 티켓 확인하는 단계 두가지가 있어서 다음 페이지를 어디로 이동시킬지 결정하기 위함입니다. + //단계도중 새로고침이 발생하면 홈페이지로 보냅니다. const { processForValidationNextPage } = useSelector( state => state.routePagination @@ -40,6 +41,10 @@ function SendValidationNumberPage({ ...props }) { const frontButtonHandler = () => { console.log(validationNumber); + if (validationNumber === null || validationNumber.length !== 6) { + alert('인증번호 6자리를 제대로 입력 해주세요'); + return; + } dispatch( messageValidation( { @@ -52,8 +57,12 @@ function SendValidationNumberPage({ ...props }) { ); }; - useEffect(() => {}, [errorMessage, pending]); - console.log('인증번호 페이지'); + useEffect(() => { + if (errorMessage !== null && pending === false) { + alert('인증번호가 잘못되었습니다.'); + } + }, [errorMessage, pending]); + return (