Skip to content

Commit

Permalink
fix: 인증번호 미입력시 api 호출 X
Browse files Browse the repository at this point in the history
  • Loading branch information
iOdiO89 committed Jul 2, 2024
1 parent 7d75fd4 commit ad569f4
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/home/certifyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@ export default function CertifyModal({
const { mutate } = usePostAttendance(challengeIdx);

const onCertify = () => {
mutate(number);
setIsModalVisible(false);
if (number.length === 0)
setNumError({
status: true,
text: "인증번호가 입력되지 않았습니다.",
});
else {
mutate(number);
setIsModalVisible(false);
}
};

return (
Expand Down

0 comments on commit ad569f4

Please sign in to comment.