diff options
Diffstat (limited to 'src/lib/product/components/Product')
| -rw-r--r-- | src/lib/product/components/Product/ProductDesktop.jsx | 6 | ||||
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/lib/product/components/Product/ProductDesktop.jsx b/src/lib/product/components/Product/ProductDesktop.jsx index 0ff904af..73d072e8 100644 --- a/src/lib/product/components/Product/ProductDesktop.jsx +++ b/src/lib/product/components/Product/ProductDesktop.jsx @@ -80,7 +80,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { } const productSimilarQuery = [ - product?.name.replace(/[()/"&]/g, ''), + product?.name, `fq=-product_id_i:${product.id}`, `fq=-manufacture_id_i:${product.manufacture?.id || 0}` ].join('&') @@ -175,7 +175,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { Lihat Varian </button> ) : ( - <td className='flex gap-x-3 mt-4'> + <div className='flex gap-x-3 mt-4'> <input type='number' className='form-input w-16 py-2 text-center bg-gray_r-1' @@ -196,7 +196,7 @@ const ProductDesktop = ({ product, wishlist, toggleWishlist }) => { > Beli </button> - </td> + </div> )} <div className='flex mt-4'> diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index 493fcbf7..1194419e 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -96,7 +96,7 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { } const productSimilarQuery = [ - product?.name.replace(/[()/"&]/g, ''), + product?.name, `fq=-product_id_i:${product.id}`, `fq=-manufacture_id_i:${product.manufacture?.id || 0}` ].join('&') @@ -130,9 +130,11 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { </div> <h1 className='leading-6 font-medium mb-3'>{activeVariant?.name}</h1> - {product.variants.length > 1 && activeVariant.price.priceDiscount > 0 && !selectedVariant && ( - <div className='text-gray_r-12/80 text-caption-2 mt-2 mb-1'>Harga mulai dari: </div> - )} + {product.variants.length > 1 && + activeVariant.price.priceDiscount > 0 && + !selectedVariant && ( + <div className='text-gray_r-12/80 text-caption-2 mt-2 mb-1'>Harga mulai dari: </div> + )} {activeVariant?.price?.discountPercentage > 0 && ( <div className='flex gap-x-1 items-center'> |
