From 9a52d9f835e2f30480142c6197fdf14b3fee5ead Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Tue, 12 Mar 2024 09:17:01 +0700
Subject: feedback kerajang di mobile

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

(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..6c37b434 100644
--- a/src-migrate/pages/shop/cart/index.tsx
+++ b/src-migrate/pages/shop/cart/index.tsx
@@ -10,11 +10,15 @@ 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 useDevice from '@/core/hooks/useDevice'
+import CartSummaryMobile from '~/modules/cart/components/CartSummaryMobile'
 
 const CartPage = () => {
   const auth = getAuth()
 
   const { loadCart, cart, summary } = useCartStore()
+  
+  const useDivvice = useDevice();
 
   useEffect(() => {
     if (typeof auth === 'object' && !cart) loadCart(auth.id)
@@ -65,7 +69,8 @@ const CartPage = () => {
 
         <div className={style['summary-wrapper']}>
           <div className={style['summary']}>
-            <CartSummary {...summary} isLoaded={!!cart} />
+            {useDivvice.isMobile && <CartSummaryMobile {...summary} isLoaded={!!cart} />}
+            {!useDivvice.isMobile && <CartSummary {...summary} isLoaded={!!cart} />}
 
             <div className={style['summary-buttons']}>
               <Tooltip label={hasSelectedPromo && 'Barang promo tidak dapat dibuat quotation'}>
-- 
cgit v1.2.3

