mirror of
https://github.com/Jellify-Music/App.git
synced 2026-04-26 13:00:00 -05:00
invalidate the correct queries
This commit is contained in:
@@ -115,11 +115,15 @@ export default function TrackOptions({
|
||||
return addToPlaylist(track, playlist)
|
||||
},
|
||||
onSuccess: (data, { playlist }) => {
|
||||
trigger("notificationSuccess")
|
||||
|
||||
refetch();
|
||||
trigger("notificationSuccess");
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [QueryKeys.UserPlaylists]
|
||||
});
|
||||
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: [QueryKeys.ItemTracks, playlist.Id!, false],
|
||||
});
|
||||
},
|
||||
onError: () => {
|
||||
trigger("notificationError")
|
||||
|
||||
Reference in New Issue
Block a user