mirror of
https://github.com/nimbusdotstorage/Nimbus
synced 2026-04-22 17:45:03 +02:00
Fixed: missing querykey in useMoveFile hook
This commit is contained in:
@@ -331,7 +331,7 @@ export function useMoveFile() {
|
||||
return await response.json();
|
||||
},
|
||||
onMutate: async ({ sourceId, parentId }) => {
|
||||
await queryClient.cancelQueries({ queryKey: ["files", providerId, accountId] });
|
||||
await queryClient.cancelQueries({ queryKey: ["files", providerId, accountId, parentId] });
|
||||
|
||||
const previousFiles = queryClient.getQueryData<File[]>(["files", providerId, accountId, parentId]);
|
||||
|
||||
@@ -349,9 +349,6 @@ export function useMoveFile() {
|
||||
console.error("Error moving file:", error);
|
||||
toast.error(error.message ?? "Failed to move file");
|
||||
},
|
||||
onSettled: async () => {
|
||||
await queryClient.invalidateQueries({ queryKey: ["files", providerId, accountId] });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user