From 07d779a1e5f1f3c7c1270abbda8a7830b1cf8e17 Mon Sep 17 00:00:00 2001 From: bcho892 Date: Tue, 12 Mar 2024 17:53:06 +1300 Subject: [PATCH] allow custom options --- client/src/services/User/UserMutations.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/services/User/UserMutations.ts b/client/src/services/User/UserMutations.ts index 451c78535..010e583c1 100644 --- a/client/src/services/User/UserMutations.ts +++ b/client/src/services/User/UserMutations.ts @@ -1,8 +1,12 @@ -import { useMutation } from "@tanstack/react-query" +import { UseMutationOptions, useMutation } from "@tanstack/react-query" import UserService, { EditUsersBody } from "./UserService" -export function useEditUserMutation(users: EditUsersBody) { +export function useEditUserMutation( + users: EditUsersBody, + options: UseMutationOptions +) { return useMutation({ + ...options, mutationFn: () => UserService.editUsers(users) }) }