From 8ee5432961a5b73e8e5c42af2eda05621723c9e7 Mon Sep 17 00:00:00 2001 From: IT Fixcomart Date: Fri, 11 Nov 2022 18:02:11 +0700 Subject: Connect to solr (search product), header component with title, fix product card layout, show product search result --- src/components/ProductCard.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/components/ProductCard.js') diff --git a/src/components/ProductCard.js b/src/components/ProductCard.js index 360e11ff..49bba235 100644 --- a/src/components/ProductCard.js +++ b/src/components/ProductCard.js @@ -24,19 +24,25 @@ export default function ProductCard({ data }) { {product.name} -
+
{product.lowest_price.discount_percentage > 0 ? ( -
+
{product.lowest_price.discount_percentage}%

{currencyFormat(product.lowest_price.price)}

) : ''} -

{product.lowest_price.price_discount > 0 ? currencyFormat(product.lowest_price.price_discount) : 'Tanya harga'}

- {product.stock_total > 0 ? ( -
Ready Stock
+ {product.lowest_price.price_discount > 0 ? ( +

+ {currencyFormat(product.lowest_price.price_discount)} +

) : ( -
+ + Tanya Harga + )} + {product.stock_total > 0 ? ( +
Ready Stock
+ ) : ''}
-- cgit v1.2.3