From bc8e76f00eaa74eb0cc51b79662a53ef34a3ed67 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 24 Mar 2023 17:05:47 +0700
Subject: -

---
 src/lib/cart/components/Cart.jsx | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(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 8bd9e362..8cd6df96 100644
--- a/src/lib/cart/components/Cart.jsx
+++ b/src/lib/cart/components/Cart.jsx
@@ -128,16 +128,16 @@ const Cart = () => {
           Apakah anda yakin menghapus barang{' '}
           <span className='underline'>{deleteConfirmation?.name}</span> dari keranjang?
         </div>
-        <div className='flex mt-6 gap-x-4'>
+        <div className='flex mt-6 gap-x-4 md:justify-end'>
           <button
-            className='btn-solid-red flex-1'
+            className='btn-solid-red flex-1 md:flex-none'
             type='button'
             onClick={() => deleteProduct(deleteConfirmation?.id)}
           >
             Ya, Hapus
           </button>
           <button
-            className='btn-light flex-1'
+            className='btn-light flex-1 md:flex-none'
             type='button'
             onClick={() => setDeleteConfirmation(null)}
           >
@@ -302,6 +302,15 @@ const Cart = () => {
                 </tr>
               </thead>
               <tbody>
+                {cart.isLoading && (
+                  <tr>
+                    <td colSpan={6}>
+                      <div className='flex justify-center my-2'>
+                        <Spinner className='w-6 text-gray_r-12/50 fill-gray_r-12' />
+                      </div>
+                    </td>
+                  </tr>
+                )}
                 {!cart.isLoading && (!products || products?.length == 0) && (
                   <tr>
                     <td colSpan={6}>Keranjang belanja anda masih kosong</td>
-- 
cgit v1.2.3

