From 39b1235c82bc3eb0a7ca11b74cba06366652b29e Mon Sep 17 00:00:00 2001 From: Chloe Date: Wed, 12 Jun 2024 10:31:37 +0700 Subject: [PATCH] fix: typescript errors Signed-off-by: Chloe --- components/cart/delete-item-button.tsx | 2 +- components/cart/edit-item-quantity-button.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/cart/delete-item-button.tsx b/components/cart/delete-item-button.tsx index c0854727b..242ecae9b 100644 --- a/components/cart/delete-item-button.tsx +++ b/components/cart/delete-item-button.tsx @@ -39,7 +39,7 @@ export function DeleteItemButton({ item }: { item: CartItem }) { const { id: itemId, coreCharge } = item; const actionWithVariant = formAction.bind(null, [ itemId, - ...(coreCharge?.lineId ? [coreCharge.lineId] : []) + ...(coreCharge?.id ? [coreCharge.id] : []) ]); return ( diff --git a/components/cart/edit-item-quantity-button.tsx b/components/cart/edit-item-quantity-button.tsx index 007e33f0c..de0745c4b 100644 --- a/components/cart/edit-item-quantity-button.tsx +++ b/components/cart/edit-item-quantity-button.tsx @@ -48,9 +48,9 @@ export function EditItemQuantityButton({ item, type }: { item: CartItem; type: ' } ]; - if (item.coreCharge?.lineId) { + if (item.coreCharge) { payload.push({ - lineId: item.coreCharge.lineId, + lineId: item.coreCharge.id, variantId: item.coreCharge.id, quantity });