Skip to content

Commit

Permalink
fix: free open modal loading error (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungJL authored Apr 18, 2024
2 parents e412140 + 4592b0b commit c268c0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modals/study/StudyFreeOpenModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ function StudyFreeOpenModal({ setIsModal }: IStudyFreeOpenModal) {
end: { hours: 18, minutes: 0 },
});

const { mutateAsync: openFree } = useStudyOpenFreeMutation(date, {
const { mutateAsync: openFree, isLoading } = useStudyOpenFreeMutation(date, {
onSuccess() {
queryClient.invalidateQueries([STUDY_VOTE, date, location]);
completeToast("free", "스터디가 Free로 오픈되었습니다.");
setIsModal(false);
},
onError: errorToast,
});
const { mutate: patchAttend } = useStudyParticipationMutation(dayjs(date), "post", {
onSuccess: () => {
queryClient.invalidateQueries([STUDY_VOTE, date, location]);
setIsModal(false);
},
onError: errorToast,
});
Expand Down Expand Up @@ -73,6 +73,7 @@ function StudyFreeOpenModal({ setIsModal }: IStudyFreeOpenModal) {
main: {
text: "오픈",
func: onSubmit,
isLoading,
},
};

Expand Down

0 comments on commit c268c0c

Please sign in to comment.