From c9366090153e8aba3a673b2b77cbc8acc24e59a5 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 15 Dec 2023 17:15:32 +0700
Subject: Update promotion program feature

---
 src-migrate/modules/cart/ui/ProductPromo.tsx | 33 ++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 src-migrate/modules/cart/ui/ProductPromo.tsx

(limited to 'src-migrate/modules/cart/ui/ProductPromo.tsx')

diff --git a/src-migrate/modules/cart/ui/ProductPromo.tsx b/src-migrate/modules/cart/ui/ProductPromo.tsx
new file mode 100644
index 00000000..a41afc97
--- /dev/null
+++ b/src-migrate/modules/cart/ui/ProductPromo.tsx
@@ -0,0 +1,33 @@
+import Image from 'next/image'
+import React from 'react'
+import { CartProduct } from '~/common/types/cart'
+import style from '../styles/ProductPromo.module.css'
+
+type Props = {
+  product: CartProduct
+}
+
+const ProductPromo = ({ 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} />}
+      </div>
+
+      <div className={style.details}>
+        <div className={style.name}>{product.display_name}</div>
+        <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>
+  )
+}
+
+export default ProductPromo
\ No newline at end of file
-- 
cgit v1.2.3

