mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-08 13:41:38 +00:00
upgrade and refactor for react-query v5
This commit is contained in:
parent
dd70d30cd3
commit
8115963264
94 changed files with 1650 additions and 1750 deletions
|
|
@ -24,11 +24,14 @@ export const useDeletePlaylist = (args: MutationHookArgs) => {
|
|||
return api.controller.deletePlaylist({ ...args, apiClientProps: { server } });
|
||||
},
|
||||
onMutate: () => {
|
||||
queryClient.cancelQueries(queryKeys.playlists.list(server?.id || ''));
|
||||
queryClient.cancelQueries({ queryKey: queryKeys.playlists.list(server?.id || '') });
|
||||
return null;
|
||||
},
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries(queryKeys.playlists.list(server?.id || ''));
|
||||
queryClient.invalidateQueries({
|
||||
exact: false,
|
||||
queryKey: queryKeys.playlists.list(server?.id || ''),
|
||||
});
|
||||
},
|
||||
...options,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue