fix(medusa-react): update customer hook payload type (#3752)
Co-authored-by: fPolic <frane@medusajs.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"medusa-react": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(medusa-react): update customer hook payload type
|
||||||
@@ -4,7 +4,11 @@ import {
|
|||||||
useQueryClient,
|
useQueryClient,
|
||||||
} from "@tanstack/react-query"
|
} from "@tanstack/react-query"
|
||||||
|
|
||||||
import { AdminCustomersRes, AdminPostCustomersReq } from "@medusajs/medusa"
|
import {
|
||||||
|
AdminCustomersRes,
|
||||||
|
AdminPostCustomersCustomerReq,
|
||||||
|
AdminPostCustomersReq,
|
||||||
|
} from "@medusajs/medusa"
|
||||||
import { Response } from "@medusajs/medusa-js"
|
import { Response } from "@medusajs/medusa-js"
|
||||||
|
|
||||||
import { useMedusa } from "../../../contexts"
|
import { useMedusa } from "../../../contexts"
|
||||||
@@ -32,13 +36,13 @@ export const useAdminUpdateCustomer = (
|
|||||||
options?: UseMutationOptions<
|
options?: UseMutationOptions<
|
||||||
Response<AdminCustomersRes>,
|
Response<AdminCustomersRes>,
|
||||||
Error,
|
Error,
|
||||||
AdminPostCustomersReq
|
AdminPostCustomersCustomerReq
|
||||||
>
|
>
|
||||||
) => {
|
) => {
|
||||||
const { client } = useMedusa()
|
const { client } = useMedusa()
|
||||||
const queryClient = useQueryClient()
|
const queryClient = useQueryClient()
|
||||||
return useMutation(
|
return useMutation(
|
||||||
(payload: AdminPostCustomersReq) =>
|
(payload: AdminPostCustomersCustomerReq) =>
|
||||||
client.admin.customers.update(id, payload),
|
client.admin.customers.update(id, payload),
|
||||||
buildOptions(
|
buildOptions(
|
||||||
queryClient,
|
queryClient,
|
||||||
|
|||||||
Reference in New Issue
Block a user