diff --git a/framework/commerce/cart/use-cart.tsx b/framework/commerce/cart/use-cart.tsx index 223767b6f..ecc537539 100644 --- a/framework/commerce/cart/use-cart.tsx +++ b/framework/commerce/cart/use-cart.tsx @@ -6,10 +6,10 @@ import { useCommerce } from '..' export type CartResponse = ResponseState & { isEmpty?: boolean } export type CartInput = { - cartId: Cart['id'] + cartId?: BaseCart['id'] } -export default function useCart( +export default function useCart( options: HookFetcherOptions, input: HookInput, fetcherFn: HookFetcher, diff --git a/framework/commerce/types.d.ts b/framework/commerce/types.d.ts index e5b1ed7c1..eb178619d 100644 --- a/framework/commerce/types.d.ts +++ b/framework/commerce/types.d.ts @@ -127,7 +127,8 @@ interface BaseCart { discounts?: DiscountBase[] } -interface Cart extends Entity { +// TODO: Remove this type in favor of BaseCart +interface Cart2 extends Entity { id: string | undefined currency: { code: string } taxIncluded?: boolean