Skip to content

Commit

Permalink
[fix] AuthModalLogic fix
Browse files Browse the repository at this point in the history
  • Loading branch information
subsub-e committed Aug 22, 2024
1 parent 80f53b0 commit 91f88ef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions service/src/components/modal/PhoneAuthModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function PhoneAuthModal({
setResultModalOpen,
closeAuthModal,
handleDisabledClick,
controls,
}) {
const { userInfo, setUserInfo } = useContext(AuthContext);
const [validateCode, setValidateCode] = useState('');
Expand All @@ -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 {
Expand Down Expand Up @@ -79,6 +84,7 @@ PhoneAuthModal.propTypes = {
closeAuthModal: PropTypes.func.isRequired,
option: PropTypes.string,
handleDisabledClick: PropTypes.func.isRequired,
controls: PropTypes.object.isRequired,
};

export default PhoneAuthModal;
1 change: 1 addition & 0 deletions service/src/components/modal/PhoneInputModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ function PhoneInputModal({ closePhoneModal, option = '', setResultModalOpen }) {
closeAuthModal={closeAuthModal}
option={option}
handleDisabledClick={handleDisabledClick}
controls={controls}
/>
) : (
<>
Expand Down

0 comments on commit 91f88ef

Please sign in to comment.