Checkout Context

amerta


amerta / amerta/theme/components/Checkout/hooks/useCheckout / CheckoutContext

Variable: CheckoutContext

const CheckoutContext: Context<{ checkoutState: { cities: { id: string; name: string; }[]; deliveryMethods: any[]; discount: number; form: UseFormReturn<CheckoutFormValues, any, CheckoutFormValues>; handleCountryChange: (countryId) => Promise<void>; hasSpecificCities: boolean; loadingDeliveryMethods: boolean; loadingTaxes: boolean; onInvalid: () => Promise<void>; onSubmit: (values) => Promise<void>; orderTaxPercentage: number; qualifiesForFree: any; setCart: Dispatch<SetStateAction<CartWithCalculations | null>>; setShowErrorDialog: Dispatch<SetStateAction<boolean>>; setUseShippingAsBilling: Dispatch<SetStateAction<boolean>>; shippingCost: any; showErrorDialog: boolean; subtotal: number; tax: number; taxRates: { code: string; id: string; name: string; rate: number; }[]; total: any; useShippingAsBilling: boolean; }; customer: Customer | null; data: { countries: any[]; paymentMethods: PaymentMethod[]; }; deliveryMethods: any[]; ecommerceSettings: EcommerceSettings; form: UseFormReturn<CheckoutFormValues>; loadingDeliveryMethods: boolean; locale: string; paymentMethodRef: MutableRefObject<PaymentHandle | null>; }>

Defined in: amerta/theme/components/Checkout/hooks/useCheckout.tsx:48