diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-11-04 11:40:55 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-11-04 11:40:55 +0700 |
| commit | c5dace224323287f927ba352712743fe2eaca241 (patch) | |
| tree | e25836c8c3bfb9a71e5fe4b42814398df2f650ab /src/components/ProductCard.js | |
| parent | e93103fa78d610737e56b1b99056acdd84a9adde (diff) | |
Add popular product and ready stock product in home
Diffstat (limited to 'src/components/ProductCard.js')
| -rw-r--r-- | src/components/ProductCard.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/ProductCard.js b/src/components/ProductCard.js index 250a5c7d..360e11ff 100644 --- a/src/components/ProductCard.js +++ b/src/components/ProductCard.js @@ -32,6 +32,11 @@ export default function ProductCard({ data }) { </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> + ) : ( + <div className="h-6"></div> + )} </div> </div> </div> |
