Skip to content

Commit

Permalink
Merge pull request #1050 from 42organization/GGFE-261-출석모달버그
Browse files Browse the repository at this point in the history
[GGFE-261] 409에러시 리로드
  • Loading branch information
parksangmin1543 authored Sep 20, 2023
2 parents 35b0d52 + c5c70f8 commit 7130c56
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/modal/event/WelcomeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ export default function WelcomeModal() {
});
} catch (error: any) {
if (error.response.status === 409) {
setButtonState(false);
alert('출석은 하루에 한 번만 가능합니다.');
// queryClient.refetchQueries('user');
queryClient.refetchQueries('user').then(() => {
queryClient.invalidateQueries('user').then(() => {
setModal({ modalName: null });
window.location.reload();
});
} else {
setError('SM01');
queryClient.refetchQueries('user');
}
} finally {
setIsLoading(false);
Expand Down
1 change: 1 addition & 0 deletions components/modal/statChange/CoinChangeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default function CoinChangeModal(coin: CoinResult) {
}, []);

const closeModal = () => {
queryClient.refetchQueries('user');
setModal({ modalName: null });
};

Expand Down

0 comments on commit 7130c56

Please sign in to comment.