Skip to content

Commit

Permalink
reset cache after mutations
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev committed Nov 3, 2024
1 parent 03a341a commit cffadfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/services/Admin/AdminMutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,11 @@ export function useDeleteBookingMutation() {
})
}

/**
* Utility function to refresh the events cache
*/
const invalidateEventsQuery = () => {
queryClient.invalidateQueries({
queryClient.removeQueries({
queryKey: [ALL_EVENTS_QUERY_KEY]
})
}
Expand Down

0 comments on commit cffadfa

Please sign in to comment.