From 9661bcf006332508084d4fdf5c0e2041fdfe9162 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 8 Mar 2024 17:11:36 +0700
Subject: Update empty state on cart page

---
 src-migrate/pages/shop/cart/index.tsx | 10 ++++++++++
 1 file changed, 10 insertions(+)

(limited to 'src-migrate/pages/shop/cart/index.tsx')

diff --git a/src-migrate/pages/shop/cart/index.tsx b/src-migrate/pages/shop/cart/index.tsx
index 9ec58a48..5c047af4 100644
--- a/src-migrate/pages/shop/cart/index.tsx
+++ b/src-migrate/pages/shop/cart/index.tsx
@@ -10,6 +10,7 @@ import { useCartStore } from '~/modules/cart/stores/useCartStore'
 import CartItem from '~/modules/cart/components/Item'
 import CartSummary from '~/modules/cart/components/Summary'
 import clsxm from '~/libs/clsxm'
+import Image from '~/components/ui/image'
 
 const CartPage = () => {
   const auth = getAuth()
@@ -60,6 +61,15 @@ const CartPage = () => {
 
           <div className={style['items']}>
             {cart?.products.map((item) => <CartItem key={item.id} item={item} />)}
+
+            {cart?.products?.length === 0 && (
+              <div className='flex flex-col items-center'>
+                <Image src='/images/empty_cart.svg' alt='Empty Cart' width={450} height={450} />
+                <div className='text-title-sm md:text-title-lg text-center font-semibold'>Keranjangnya masih kosong nih</div>
+                <div className='text-body-2 md:text-body-1 text-center mt-3'>Yuk, tambahin barang-barang yang kamu mau ke keranjang sekarang!<br />Ada banyak potongan belanjanya pakai kode voucher</div>
+                <Link href='/' className='btn-solid-red rounded-full text-body-1 mt-6'>Mulai Belanja</Link>
+              </div>
+            )}
           </div>
         </div>
 
-- 
cgit v1.2.3

