diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-07-11 08:38:37 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2024-07-11 08:38:37 +0000 |
| commit | de1bb091b148aa5ef2d5a168e19f1c2dac9e67b0 (patch) | |
| tree | 1282a5abf21e8539df499d8172c1786ad413e9cc /src-migrate/modules/cart | |
| parent | 0aa235cb03e92209d2bcbda8eda4c33d35e62e13 (diff) | |
| parent | 46769b859bb56807d47053c3b99810455db12803 (diff) | |
Merged in Feature/all-promotion (pull request #159)
Feature/all promotion
Diffstat (limited to 'src-migrate/modules/cart')
| -rw-r--r-- | src-migrate/modules/cart/components/Item.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src-migrate/modules/cart/components/Item.tsx b/src-migrate/modules/cart/components/Item.tsx index 6ded6373..a382279f 100644 --- a/src-migrate/modules/cart/components/Item.tsx +++ b/src-migrate/modules/cart/components/Item.tsx @@ -100,13 +100,14 @@ 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 ? item.image_program[0] : item?.parent?.image; - return ( + return ( <> {item.cart_type === 'promotion' && ( <div className={style.image}> - {image && <Image src={image} alt={item.name} width={128} height={128} />} - {!image && <div className={style.noImage}>No Image</div>} + {imageProgram && <Image src={imageProgram} alt={item.name} width={128} height={128} />} + {!imageProgram && <div className={style.noImage}>No Image</div>} </div> )} |
