From f356538cd4ad808f90c363e6d7df2a19c4993713 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Fri, 24 Oct 2025 15:20:35 +0700 Subject: Fake Stock --- src/lib/product/components/Product/ProductMobileVariant.jsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/product/components/Product/ProductMobileVariant.jsx') diff --git a/src/lib/product/components/Product/ProductMobileVariant.jsx b/src/lib/product/components/Product/ProductMobileVariant.jsx index cab8e9be..4cfc63ca 100644 --- a/src/lib/product/components/Product/ProductMobileVariant.jsx +++ b/src/lib/product/components/Product/ProductMobileVariant.jsx @@ -176,6 +176,11 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { fetchData(); }, [product]); + const [fakeStock] = useState(() => { + // inisialisasi sekali doang pas pertama kali komponen dibuat + return Math.floor(Math.random() * 100) + 1; + }); + return ( {/* PRICE & ACTIONS: tetap punyamu, hanya hapus input number lama */} @@ -245,7 +250,8 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { product?.sla?.qty < 10 ? 'text-red-600 font-medium' : '' }`} > - Stock : {activeVariant?.stock ?? 0} + {/* Stock : {activeVariant?.stock ?? 0} */} + Stock : {fakeStock}{' '} {qtyPickUp > 0 && (
@@ -291,7 +297,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => {
-
+
{/* TOMBOL AKSI */}
{/* Tombol Dokumen */} -- cgit v1.2.3