useGetEscrowsMilestones
useGetEscrowsMilestones
Import
import { useGetEscrowsMilestones } from "@trustless-work/escrow/hooks/rest";Signature
function useGetEscrowsMilestones(): {
getEscrowsMilestones: (
params: BatchContractIdsParams | string[],
) => Promise<BatchEscrowMilestonesResponse>;
};Example
import { useGetEscrowsMilestones } from "@trustless-work/escrow/hooks/rest";
import { useQuery } from "@tanstack/react-query";
const { getEscrowsMilestones } = useGetEscrowsMilestones();
const { data } = useQuery({
queryKey: ["escrows-milestones", contractIds],
queryFn: () => getEscrowsMilestones({ contractIds }),
enabled: contractIds.length > 0,
});