add mutaionFn

This commit is contained in:
1 2024-05-27 14:12:59 +02:00
parent 35745d752d
commit 5f2365d412

View File

@ -7,6 +7,7 @@ const useOfflineMutation = () => {
const queryClient = useQueryClient(); const queryClient = useQueryClient();
queryClient.setMutationDefaults(['sendRequest'], { queryClient.setMutationDefaults(['sendRequest'], {
mutationFn: sendRequest,
onMutate: async (newData) => { onMutate: async (newData) => {
await queryClient.cancelQueries('data'); await queryClient.cancelQueries('data');