From a1b0e672387747085c85c6c446cea49f09af7719 Mon Sep 17 00:00:00 2001
From: Miqdad <ahmadmiqdad27@gmail.com>
Date: Sat, 23 Aug 2025 08:49:46 +0700
Subject: <Miqdad> Move stock position mobile

---
 .../product-detail/components/PriceAction.tsx      | 43 ++++++++++++++++------
 1 file changed, 31 insertions(+), 12 deletions(-)

(limited to 'src-migrate/modules/product-detail/components/PriceAction.tsx')

diff --git a/src-migrate/modules/product-detail/components/PriceAction.tsx b/src-migrate/modules/product-detail/components/PriceAction.tsx
index 850c2d9d..f5c2d7b3 100644
--- a/src-migrate/modules/product-detail/components/PriceAction.tsx
+++ b/src-migrate/modules/product-detail/components/PriceAction.tsx
@@ -17,7 +17,9 @@ type Props = {
   product: IProductDetail;
 };
 
-const PPN : number = process.env.NEXT_PUBLIC_PPN ? parseFloat(process.env.NEXT_PUBLIC_PPN) : 0;
+const PPN: number = process.env.NEXT_PUBLIC_PPN
+  ? parseFloat(process.env.NEXT_PUBLIC_PPN)
+  : 0;
 const PriceAction = ({ product }: Props) => {
   const {
     activePrice,
@@ -104,6 +106,21 @@ const PriceAction = ({ product }: Props) => {
             Termasuk PPN: Rp{' '}
             {formatCurrency(Math.round(activePrice.price_discount * PPN))}
           </div>
+          {isMobile && (
+          <div>
+            <Skeleton
+              isLoaded={sla}
+              h='21px'
+              // w={16}
+              className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}
+            >
+              Stock : {sla?.qty}{' '}
+            </Skeleton>
+            {/* <span className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}>
+            {' '}
+          </span> */}
+          </div>
+          )}
         </>
       )}
 
@@ -149,19 +166,21 @@ const PriceAction = ({ product }: Props) => {
           </button>
         </div>
 
-        <div>
-          <Skeleton
-            isLoaded={sla}
-            h='21px'
-            // w={16}
-            className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}
-          >
-            Stock : {sla?.qty}{' '}
-          </Skeleton>
-          {/* <span className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}>
+        {isDesktop && (
+          <div>
+            <Skeleton
+              isLoaded={sla}
+              h='21px'
+              // w={16}
+              className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}
+            >
+              Stock : {sla?.qty}{' '}
+            </Skeleton>
+            {/* <span className={sla?.qty < 10 ? 'text-red-600 font-medium' : ''}>
             {' '}
           </span> */}
-        </div>
+          </div>
+        )}
         <div>
           {qtyPickUp > 0 && (
             <Link href='/panduan-pick-up-service' className='group'>
-- 
cgit v1.2.3

