UNPKG

@open-tender/utils

Version:

A library of utils for use with Open Tender applications that utilize our cloud-based Order API.

14 lines (13 loc) 707 B
/// <reference types="react" /> import { Cart, CartItemWithPoints, CheckoutCheck, CheckoutForm, CheckoutPoints, OrderCreatePoints } from '@open-tender/types'; export declare const useCartPoints: (cart: Cart | null, check: CheckoutCheck | null, form: CheckoutForm, updatePoints: (points: OrderCreatePoints) => void) => { cartDiff: number; cartWithPoints: CartItemWithPoints[]; points: import("@open-tender/types").CheckoutConfigLoyalty | null | undefined; pointsBalance: number; pointsRemaining: number; pointsApplied: number; pointsName: string | null; pointsObj: CheckoutPoints | null; setCartLength: import("react").Dispatch<import("react").SetStateAction<number>>; };