summaryrefslogtreecommitdiff
path: root/src/lib/cart
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/cart')
-rw-r--r--src/lib/cart/components/Cartheader.jsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx
index dd6c276e..cbe7c7e1 100644
--- a/src/lib/cart/components/Cartheader.jsx
+++ b/src/lib/cart/components/Cartheader.jsx
@@ -48,7 +48,7 @@ const Cardheader = (cartCount) => {
setProductCart(cart)
setCountCart(cart.productTotal)
setIsloading(false)
- }, [setProductCart])
+ }, [setProductCart, setIsloading])
useEffect(() => {
if (!products) return
@@ -158,14 +158,14 @@ const Cardheader = (cartCount) => {
</div>
</div>
))}
- {products.length === 0 && !isLoading && (
+ {auth && products.length === 0 && !isLoading && (
<div className='justify-center p-4'>
<p className='text-gray-500 text-center '>
Tidak Ada Produk di Keranjang Belanja Anda
</p>
</div>
)}
- {products.length > 0 && !isLoading && (
+ {auth && products.length > 0 && !isLoading && (
<>
<ul role='list' class='divide-y divide-gray-200 dark:divide-gray-700'>
{products &&
@@ -251,11 +251,11 @@ const Cardheader = (cartCount) => {
</>
)}
</div>
- {products.length > 0 && !isLoading && (
+ {auth && products.length > 0 && !isLoading && (
<>
<div className='mt-3'>
- <span className='text-gray-400 text-caption-2'>Sub Total Sebelum PPN : </span>
- <span className='font-semibold text-red-600'>Rp. {currencyFormat(subTotal)}</span>
+ <span className='text-gray-400 text-caption-2'>Subtotal Sebelum PPN : </span>
+ <span className='font-semibold text-red-600'>{currencyFormat(subTotal)}</span>
</div>
<div className='mt-5 mb-2'>
<button