summaryrefslogtreecommitdiff
path: root/src/lib/cart/components
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-02-22 14:00:00 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-02-22 14:00:00 +0700
commit7265295454801c1d921385a4b67fb3780b46771e (patch)
treea45e7c0add3641d6a234c3b610adc72a08631616 /src/lib/cart/components
parent757b69f4d814ec4890c209f7a9fdf3d9940157d9 (diff)
fix
Diffstat (limited to 'src/lib/cart/components')
-rw-r--r--src/lib/cart/components/Cart.jsx8
1 files changed, 8 insertions, 0 deletions
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