Skip to content

Commit

Permalink
invalidate booking availabilities after adding user (#729)
Browse files Browse the repository at this point in the history
* invalidate booking availabilities after adding user

* update correct mutation 🤡

* invalidate seperately
  • Loading branch information
choden-dev authored Jul 30, 2024
1 parent 50ac5d9 commit 453fe5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions client/src/services/Admin/AdminMutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export function useAddUserToBookingMutation() {
queryClient.invalidateQueries({
queryKey: [ALL_BOOKINGS_BETWEEN_RANGE_QUERY]
})

queryClient.invalidateQueries({
queryKey: [BOOKING_AVAILABLITY_KEY]
})
}
})
}
Expand All @@ -142,6 +146,10 @@ export function useDeleteBookingMutation() {
queryClient.invalidateQueries({
queryKey: [ALL_BOOKINGS_BETWEEN_RANGE_QUERY]
})

queryClient.invalidateQueries({
queryKey: [BOOKING_AVAILABLITY_KEY]
})
}
})
}

0 comments on commit 453fe5b

Please sign in to comment.