From d584d4620ff633e68fa37f98089d9056012e7b21 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 11 Jul 2024 14:10:18 +0700 Subject: add image promotion on keranjang --- src-migrate/modules/cart/components/Item.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src-migrate/modules') diff --git a/src-migrate/modules/cart/components/Item.tsx b/src-migrate/modules/cart/components/Item.tsx index 6ded6373..a757ba37 100644 --- a/src-migrate/modules/cart/components/Item.tsx +++ b/src-migrate/modules/cart/components/Item.tsx @@ -100,13 +100,15 @@ const CartItem = ({ item, editable = true }: Props) => { CartItem.Image = function CartItemImage({ item }: { item: CartItemProps }) { const image = item?.image || item?.parent?.image + const imageProgram = item?.image_program[0] || item?.parent?.image + - return ( + return ( <> {item.cart_type === 'promotion' && (
- {image && {item.name}} - {!image &&
No Image
} + {imageProgram && {item.name}} + {!imageProgram &&
No Image
}
)} -- cgit v1.2.3