diff options
| author | Rafi Zadanly <rafizadanly@gmail.com> | 2022-12-29 15:23:30 +0700 |
|---|---|---|
| committer | Rafi Zadanly <rafizadanly@gmail.com> | 2022-12-29 15:23:30 +0700 |
| commit | 737a880ee01bfe5c05c39ec03185a680a51cbce3 (patch) | |
| tree | 60539cbd88a2aa2da91350114bf58543a629e78a /src/pages/shop/cart.js | |
| parent | ec9e0f90c3d8111d77cc4bfc3c5f56f473428786 (diff) | |
Checkout detail
Diffstat (limited to 'src/pages/shop/cart.js')
| -rw-r--r-- | src/pages/shop/cart.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pages/shop/cart.js b/src/pages/shop/cart.js index 6fe079b3..2ab0aaf5 100644 --- a/src/pages/shop/cart.js +++ b/src/pages/shop/cart.js @@ -197,9 +197,7 @@ export default function Cart() { <LineDivider/> - <div className="p-4"> - {/* [Start] Product List */} - <div className="flex flex-col gap-y-6"> + <div className="p-4 flex flex-col gap-y-6"> {products.map((product, index) => ( <div className="flex gap-x-3" key={index}> <div className="w-4/12 flex items-center gap-x-2"> @@ -223,13 +221,12 @@ export default function Cart() { </p> <div className="flex flex-wrap gap-x-1 items-center mb-2 mt-auto"> <p className="text-caption-2 text-gray_r-12">{currencyFormat(product.price.price_discount)}</p> - {product.price.discount_percentage > 0 ? ( + {product.price.discount_percentage > 0 && ( <> <span className="badge-red">{product.price.discount_percentage}%</span> <p className="text-caption-2 text-gray_r-11 line-through">{currencyFormat(product.price.price)}</p> </> - ) : ''} - + )} </div> <div className="flex items-center"> <p className="mr-auto text-caption-2 text-gray_r-12 font-bold">{currencyFormat(product.quantity * product.price.price_discount)}</p> @@ -262,8 +259,6 @@ export default function Cart() { </div> </div> ))} - </div> - {/* [End] Product List */} </div> <LineDivider/> |
