Updated client packages

This commit is contained in:
Donkie
2026-01-06 01:40:59 +01:00
parent 848f5dcc94
commit b627e151a8
27 changed files with 2603 additions and 1840 deletions

View File

@@ -34,7 +34,9 @@ export function useRenameSpoolLocation() {
return await response.text();
},
onMutate: async (value) => {
await queryClient.cancelQueries(queryKeyList);
await queryClient.cancelQueries({
queryKey: queryKeyList
});
// Optimistically update all spools with matching location to the new one
queryClient.setQueriesData<GetListResponse<ISpool>>({ queryKey: queryKeyList }, (old) => {
@@ -71,7 +73,9 @@ export function useRenameSpoolLocation() {
},
onSuccess: (_data, _value) => {
// Mutation succeeded, refetch
queryClient.invalidateQueries(queryKey);
queryClient.invalidateQueries({
queryKey: queryKey
});
},
});
}