From 7265295454801c1d921385a4b67fb3780b46771e Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 22 Feb 2023 14:00:00 +0700
Subject: fix

---
 src/lib/cart/components/Cart.jsx | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'src/lib/cart/components/Cart.jsx')

diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx
index df74bed6..2d94ac0b 100644
--- a/src/lib/cart/components/Cart.jsx
+++ b/src/lib/cart/components/Cart.jsx
@@ -10,6 +10,7 @@ import { useRouter } from 'next/router'
 import BottomPopup from '@/core/components/elements/Popup/BottomPopup'
 import { toast } from 'react-hot-toast'
 import Spinner from '@/core/components/elements/Spinner/Spinner'
+import Alert from '@/core/components/elements/Alert/Alert'
 
 const Cart = () => {
   const router = useRouter()
@@ -126,6 +127,13 @@ const Cart = () => {
             <Spinner className='w-6 text-gray_r-12/50 fill-gray_r-12' />
           </div>
         )}
+
+        {!cart.isLoading && !products && (
+          <Alert className='text-center my-2' type='info'>
+            Keranjang belanja anda masih kosong
+          </Alert>
+        )}
+
         {products?.map((product) => (
           <div key={product?.id} className='flex'>
             <button
-- 
cgit v1.2.3

