From 4f7ef327e06cfba8e68f7e31f969ec15f8d3b375 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Tue, 28 Oct 2025 22:39:49 +0700 Subject: styling --- .../components/Product/ProductMobileVariant.jsx | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) (limited to 'src/lib/product/components') diff --git a/src/lib/product/components/Product/ProductMobileVariant.jsx b/src/lib/product/components/Product/ProductMobileVariant.jsx index d3d22d80..1d461382 100644 --- a/src/lib/product/components/Product/ProductMobileVariant.jsx +++ b/src/lib/product/components/Product/ProductMobileVariant.jsx @@ -19,6 +19,7 @@ import whatsappUrl from '@/core/utils/whatsappUrl'; import { getAuth } from '~/libs/auth'; import SimilarBottom from '~/modules/product-detail/components/SimilarBottom'; import ProductSimilar from '../ProductSimilar'; +import styles from '../../styles/desc_mobile_variant.module.css'; const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { const router = useRouter(); @@ -175,12 +176,14 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { }; fetchData(); }, [product]); + console.log(product); + console.log(product.parent.description); return ( {/* PRICE & ACTIONS: tetap punyamu, hanya hapus input number lama */} {/* ===== BAR BAWAH (fixed) ===== */} -
+
{/* HARGA & PPN (logikamu tetap) */} {activeVariant.isFlashSale && activeVariant?.price?.discountPercentage > 0 ? ( @@ -196,7 +199,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { {currencyFormat(activeVariant?.price?.priceDiscount)}
-
+
Termasuk PPN:{' '} {currencyFormat( activeVariant?.price.priceDiscount * process.env.NEXT_PUBLIC_PPN @@ -204,11 +207,11 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => {
) : ( -
+
{activeVariant?.price?.price > 0 ? ( <> {currencyFormat(activeVariant?.price?.price)} -
+
Termasuk PPN:{' '} {currencyFormat( activeVariant?.price.price * process.env.NEXT_PUBLIC_PPN @@ -238,7 +241,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { )} {/* ⬇️ TAMBAHKAN BLOK INI DI DALAM BAR: STOK & STEPPER */} -
+
{ colorScheme='red' isDisabled={product.stock === 0} > - Beli + Beli Sekarang
@@ -491,11 +494,11 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { @@ -556,7 +559,7 @@ const ProductMobileVariant = ({ product, wishlist, toggleWishlist }) => { const informationTabOptions = [ { value: 'specification', label: 'Spesifikasi' }, - // { value: 'description', label: 'Deskripsi' }, + { value: 'description', label: 'Deskripsi' }, // { value: 'information', label: 'Info Penting' } ]; @@ -575,11 +578,14 @@ const TabButton = ({ children, active, ...props }) => { ); }; -const TabContent = ({ children, active, className, ...props }) => ( -
- {children} -
-); +const TabContent = ({ children, active, className = '', ...props }) => { + if (!active) return null; // <— jangan render kalau tidak aktif + return ( +
+ {children} +
+ ); +}; const SpecificationContent = ({ children, label }) => (
-- cgit v1.2.3