Fix: 리뷰 수락 거절 생성 삭제 후 캐시 삭제를 쿼리 추가
This commit is contained in:
parent
82ed776c9d
commit
8debec1ec5
@ -14,6 +14,7 @@ export default function useApproveReviewQuery({ projectId, reviewId, memberId }:
|
||||
mutationFn: () => approveReview(projectId, reviewId),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewDetail', projectId, reviewId, memberId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewByStatus', projectId, reviewId, memberId] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ export default function useCreateReviewQuery() {
|
||||
|
||||
onSuccess: (_, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewDetail', variables.projectId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewByStatus', variables.projectId] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ export default function useDeleteReviewQuery() {
|
||||
deleteReview(projectId, reviewId, memberId),
|
||||
onSuccess: (_, variables) => {
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewDetail', variables.projectId, variables.reviewId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewByStatus', variables.projectId, variables.reviewId] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ export default function useRejectReviewQuery({ projectId, reviewId, memberId }:
|
||||
mutationFn: () => rejectReview(projectId, reviewId),
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewDetail', projectId, reviewId, memberId] });
|
||||
queryClient.invalidateQueries({ queryKey: ['reviewByStatus', projectId, reviewId, memberId] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user