summaryrefslogtreecommitdiff
path: root/src/lib/cart/components
diff options
context:
space:
mode:
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