Skip to content

Commit

Permalink
Merge pull request #158 from softeerbootcamp4th/feat/#156/AuthModalFix
Browse files Browse the repository at this point in the history
[fix] AuthModalLogic fix
  • Loading branch information
yoonc01 authored Aug 22, 2024
2 parents b0e742b + 91f88ef commit 5be55f2
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 5be55f2

Please sign in to comment.