Price Hooks
useIgPrices()
useIgPrices()export interface UseIgPricesProps {
productId?: string;
variantId?: string;
originalPrice: number;
originalCompareAtPrice?: number;
currencyCode?: string;
}
export interface UseIgPricesReturn {
igPrice: IgPriceReturn;
igCompareAtPrice?: IgPriceReturn;
isIgPrice: boolean;
isReady: boolean;
}
export interface IgPriceReturn {
value: number | null;
currencyCode: string;
}
type UseIgPricesInput = UseIgPricesProps | UseIgPricesProps[];
export type UseIgPricesOutput<T extends UseIgPricesInput> =
T extends UseIgPricesProps[]
? Record<string, UseIgPricesReturn>
: UseIgPricesReturn;
const useIgPrices = <T extends UseIgPricesInput> (props: UseIgPricesInput) => UseIgPricesOutputuseIgStyles
useIgStylesLast updated