summaryrefslogtreecommitdiff
path: root/src/core/components/elements/Navbar/NavbarDesktop.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/components/elements/Navbar/NavbarDesktop.jsx')
-rw-r--r--src/core/components/elements/Navbar/NavbarDesktop.jsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index 3da0035a..26edd5a4 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -73,11 +73,13 @@ const NavbarDesktop = () => {
Quotation
</Link>
<Link href='/shop/cart' className='flex items-center gap-x-2 !text-gray_r-12/80'>
- <div className='relative mr-2'>
+ <div className={`relative ${cartCount > 0 && 'mr-2'}`}>
<ShoppingCartIcon className='w-7' />
- <span className='absolute -top-2 -right-2 badge-solid-red rounded-full w-5 h-5 flex items-center justify-center'>
- {cartCount}
- </span>
+ {cartCount > 0 && (
+ <span className='absolute -top-2 -right-2 badge-solid-red rounded-full w-5 h-5 flex items-center justify-center'>
+ {cartCount}
+ </span>
+ )}
</div>
<span>
Keranjang