change name hook

This commit is contained in:
hamid zarghami
2025-12-07 16:43:23 +03:30
parent 10e5143d78
commit 0bc80a59ec
4 changed files with 13 additions and 3 deletions
@@ -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),
});
};