From 321e0c09be4b26d72b470407217262d10c88089d Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 22:57:48 +0700 Subject: fix --- src/lib/cart/components/Cart.jsx | 70 ++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'src/lib/cart/components') diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index 2d94ac0b..af2bec78 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -103,7 +103,7 @@ const Cart = () => { const selectedProduct = () => { if (!products) return [] - return products.filter((product) => product.selected == true) + return products?.filter((product) => product.selected == true) } const deleteProduct = (productId) => { @@ -115,27 +115,27 @@ const Cart = () => { } return ( -
+

Daftar Produk Belanja

Cari Produk Lain
-
+
{cart.isLoading && (
)} - {!cart.isLoading && !products && ( - + {!cart.isLoading && (!products || products?.length == 0) && ( + Keranjang belanja anda masih kosong )} {products?.map((product) => ( -
+
))} -
-
-
-
- Total: - -   - {selectedProduct().length > 0 - ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) - : '-'} - +
+
+
+ Total: + +   + {selectedProduct().length > 0 + ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) + : '-'} + +
+
+
+ +
-
-
- -
-- cgit v1.2.3 From 32f684cc40e66239451fcaa93ae2971b4bd86026 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 22 Feb 2023 23:05:10 +0700 Subject: fix --- src/lib/cart/components/Cart.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib/cart/components') diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index af2bec78..d0408ddf 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -129,9 +129,11 @@ const Cart = () => { )} {!cart.isLoading && (!products || products?.length == 0) && ( - - Keranjang belanja anda masih kosong - +
+ + Keranjang belanja anda masih kosong + +
)} {products?.map((product) => ( @@ -154,7 +156,7 @@ const Cart = () => { className='object-contain object-center border border-gray_r-6 h-40 w-full rounded-md' /> -
+
Date: Wed, 22 Feb 2023 23:36:47 +0700 Subject: fix --- src/lib/cart/components/Cart.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/cart/components') diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index d0408ddf..6a503c0a 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -130,14 +130,20 @@ const Cart = () => { {!cart.isLoading && (!products || products?.length == 0) && (
- + Keranjang belanja anda masih kosong
)} {products?.map((product) => ( -
+