From 91f88ef067b63305b24655ee3133805ff3af71b0 Mon Sep 17 00:00:00 2001 From: subsub-e Date: Thu, 22 Aug 2024 10:39:18 +0900 Subject: [PATCH] [fix] AuthModalLogic fix --- service/src/components/modal/PhoneAuthModal.jsx | 6 ++++++ service/src/components/modal/PhoneInputModal.jsx | 1 + 2 files changed, 7 insertions(+) diff --git a/service/src/components/modal/PhoneAuthModal.jsx b/service/src/components/modal/PhoneAuthModal.jsx index 6dbef8a..3bf4cee 100644 --- a/service/src/components/modal/PhoneAuthModal.jsx +++ b/service/src/components/modal/PhoneAuthModal.jsx @@ -10,6 +10,7 @@ function PhoneAuthModal({ setResultModalOpen, closeAuthModal, handleDisabledClick, + controls, }) { const { userInfo, setUserInfo } = useContext(AuthContext); const [validateCode, setValidateCode] = useState(''); @@ -24,6 +25,10 @@ function PhoneAuthModal({ try { const response = await loginCode(inputPhone, validateCode); if (response.code && response.code === 'CODE_INCORRECT') { + controls.start({ + x: [0, -20, 20, -20, 20, 0], + transition: { duration: 0.5, ease: 'easeInOut' }, + }); setAlertText('인증번호를 다시 확인해주세요!'); setIsValid(false); } else { @@ -79,6 +84,7 @@ PhoneAuthModal.propTypes = { closeAuthModal: PropTypes.func.isRequired, option: PropTypes.string, handleDisabledClick: PropTypes.func.isRequired, + controls: PropTypes.object.isRequired, }; export default PhoneAuthModal; diff --git a/service/src/components/modal/PhoneInputModal.jsx b/service/src/components/modal/PhoneInputModal.jsx index 4882165..77ca4a9 100644 --- a/service/src/components/modal/PhoneInputModal.jsx +++ b/service/src/components/modal/PhoneInputModal.jsx @@ -72,6 +72,7 @@ function PhoneInputModal({ closePhoneModal, option = '', setResultModalOpen }) { closeAuthModal={closeAuthModal} option={option} handleDisabledClick={handleDisabledClick} + controls={controls} /> ) : ( <>