change name hook
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import * as api from "../service/OrderService";
|
||||
import type { GetOrdersParams } from "../service/OrderService";
|
||||
|
||||
@@ -16,3 +16,9 @@ export const useGetOrderById = (orderId: string) => {
|
||||
enabled: !!orderId,
|
||||
});
|
||||
};
|
||||
|
||||
export const useConfirmOrder = (orderId: string) => {
|
||||
return useMutation({
|
||||
mutationFn: () => api.confirmOrder(orderId),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user