We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e2eb24d + 4254b00 commit 398072eCopy full SHA for 398072e
src/entities/comment/model/useUpdateComment.ts
@@ -14,13 +14,10 @@ export const useUpdateComment = () => {
14
return useMutation({
15
mutationFn: ({ commentId, body }: UpdateCommentVars) =>
16
commentService.updateComment(commentId, body),
17
- onSuccess: (_data, variables) => {
18
- const { postId } = variables as UpdateCommentVars;
+ onSuccess: () => {
19
// 개별 댓글 상세 및 목록 계열 무효화]
20
- if (postId) {
21
- qc.invalidateQueries({ queryKey: commentKeys.all });
22
- qc.invalidateQueries({ queryKey: replyKeys.all });
23
- }
+ qc.invalidateQueries({ queryKey: commentKeys.all });
+ qc.invalidateQueries({ queryKey: replyKeys.all });
24
},
25
});
26
};
0 commit comments