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