add mutaionFn
This commit is contained in:
parent
35745d752d
commit
5f2365d412
@ -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');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user