summaryrefslogtreecommitdiff
path: root/src-migrate/modules/cart/components/ItemPromo.tsx
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-12-22 17:33:46 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-12-22 17:33:46 +0700
commit89f32128f37d99b490de7590e2116a9cfd853f89 (patch)
treefeb74cc6bd0030b291fbf3dbba9b89a7afd6ea31 /src-migrate/modules/cart/components/ItemPromo.tsx
parentc9366090153e8aba3a673b2b77cbc8acc24e59a5 (diff)
Update promotion program feature
Diffstat (limited to 'src-migrate/modules/cart/components/ItemPromo.tsx')
-rw-r--r--src-migrate/modules/cart/components/ItemPromo.tsx41
1 files changed, 41 insertions, 0 deletions
diff --git a/src-migrate/modules/cart/components/ItemPromo.tsx b/src-migrate/modules/cart/components/ItemPromo.tsx
new file mode 100644
index 00000000..951d4d6a
--- /dev/null
+++ b/src-migrate/modules/cart/components/ItemPromo.tsx
@@ -0,0 +1,41 @@
+import style from '../styles/item-promo.module.css'
+
+import Image from 'next/image'
+import React from 'react'
+
+import { CartProduct } from '~/common/types/cart'
+
+
+type Props = {
+ product: CartProduct
+}
+
+const CartItemPromo = ({ product }: Props) => {
+ return (
+ <div key={product.id} className={style.wrapper}>
+ <div className={style.imageWrapper}>
+ {product?.image && <Image src={product.image} alt={product.name} width={128} height={128} className={style.image} />}
+ </div>
+
+ <div className={style.details}>
+ <div className={style.name}>{product.display_name}</div>
+ <div className='flex'>
+ <div className="flex flex-col">
+ <div className={style.code}>{product.code}</div>
+ <div>
+ <span className={style.weightLabel}>Berat Barang: </span>
+ <span>{product.package_weight} Kg</span>
+ </div>
+ </div>
+
+ <div className={style.quantity}>
+ {product.qty}
+ </div>
+ </div>
+ </div>
+
+ </div>
+ )
+}
+
+export default CartItemPromo \ No newline at end of file