diff options
Diffstat (limited to 'src/components/ProductCard.js')
| -rw-r--r-- | src/components/ProductCard.js | 18 |
1 files changed, 12 insertions, 6 deletions
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} </Link> </div> - <div> + <div className="flex-1 mt-2"> {product.lowest_price.discount_percentage > 0 ? ( - <div className="flex gap-x-1 items-center mt-2"> + <div className="flex gap-x-1 items-center"> <span className="badge-yellow">{product.lowest_price.discount_percentage}%</span> <p className="text-xs text-gray-800 line-through">{currencyFormat(product.lowest_price.price)}</p> </div> ) : ''} - <p className="text-sm text-gray-900 font-semibold">{product.lowest_price.price_discount > 0 ? currencyFormat(product.lowest_price.price_discount) : 'Tanya harga'}</p> - {product.stock_total > 0 ? ( - <div className="badge-yellow bg-green-200 text-green-700 w-fit mt-2">Ready Stock</div> + {product.lowest_price.price_discount > 0 ? ( + <p className="text-sm text-gray-900 font-semibold"> + {currencyFormat(product.lowest_price.price_discount)} + </p> ) : ( - <div className="h-6"></div> + <a href="https://wa.me" className="py-2 rounded block text-sm border border-yellow-900 text-center"> + Tanya Harga + </a> )} + {product.stock_total > 0 ? ( + <div className="badge-yellow bg-green-200 text-green-700 w-fit mt-2">Ready Stock</div> + ) : ''} </div> </div> </div> |
