Skip to content

Commit

Permalink
allow custom options
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev committed Mar 12, 2024
1 parent 7582461 commit 07d779a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/src/services/User/UserMutations.ts
Original file line number Diff line number Diff line change
@@ -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)
})
}

0 comments on commit 07d779a

Please sign in to comment.