Skip to content

Commit

Permalink
feat: invalidate badge query on start or complete action execution
Browse files Browse the repository at this point in the history
  • Loading branch information
juliano-quatrin-nunes committed Jan 17, 2025
1 parent 3174a14 commit 9db77c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export const useCompleteActionExecution = (invalidateKey: string[]) => {
mutationFn: completeActionExecution,
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: invalidateKey });
queryClient.invalidateQueries({ queryKey: ["notifications"] });
queryClient.invalidateQueries({ queryKey: ["notifications"] });
queryClient.invalidateQueries({ queryKey: ["badge"] });

},
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const useStartActionExecution = () => {
mutationFn: startActionExecution,
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["notifications"] });
queryClient.invalidateQueries({ queryKey: ["badge"] });
},
});
};

0 comments on commit 9db77c7

Please sign in to comment.