Front: MusicView: Fix Wrong Mutation
This commit is contained in:
committed by
Clément Le Bihan
parent
962cf58e77
commit
c5124fa6ad
@@ -11,9 +11,9 @@ export const useLikeSongMutation = () => {
|
||||
const apiCall = like ? API.addLikedSong : API.removeLikedSong
|
||||
|
||||
return apiCall(songId).then(() => {
|
||||
queryClient.invalidateQueries('liked songs')
|
||||
queryClient.invalidateQueries('songs')
|
||||
queryClient.invalidateQueries([songId])
|
||||
queryClient.invalidateQueries({ queryKey: ['liked songs'] })
|
||||
queryClient.invalidateQueries({ queryKey: ['songs'] })
|
||||
queryClient.invalidateQueries({ queryKey: [songId] })
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user