summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/cart/components/Cart.jsx19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx
index 69b4ded4..0b6ea768 100644
--- a/src/lib/cart/components/Cart.jsx
+++ b/src/lib/cart/components/Cart.jsx
@@ -204,7 +204,10 @@ const Cart = () => {
<div className="sticky bottom-0 left-0 w-full p-4 mt-6 border-t border-gray_r-6 bg-white">
<div className="flex justify-between mb-4">
<div className="text-gray_r-11">
- Total: <span className="text-red_r-11 font-semibold">{ currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) }</span>
+ Total:
+ <span className="text-red_r-11 font-semibold">
+ { selectedProduct().length > 0 ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) : ' - ' }
+ </span>
</div>
</div>
<div className="flex gap-x-3">
@@ -235,20 +238,20 @@ const Cart = () => {
<div className="leading-7 text-gray_r-12/80">
Apakah anda yakin menghapus barang <span className="underline">{deleteConfirmation?.name}</span> dari keranjang?
</div>
- <div className="flex mt-6 mb-2 gap-x-4">
+ <div className="flex mt-6 gap-x-4">
<button
- className="btn-light flex-1"
+ className="btn-solid-red flex-1"
type="button"
- onClick={() => setDeleteConfirmation(null)}
+ onClick={() => deleteProduct(deleteConfirmation?.id)}
>
- Batal
+ Ya, Hapus
</button>
<button
- className="btn-solid-red flex-1"
+ className="btn-light flex-1"
type="button"
- onClick={() => deleteProduct(deleteConfirmation?.id)}
+ onClick={() => setDeleteConfirmation(null)}
>
- Ya, Hapus
+ Batal
</button>
</div>
</BottomPopup>