chore: update

This commit is contained in:
2026-05-19 18:54:36 +02:00
parent c71b596400
commit 929dea7249
6 changed files with 34 additions and 14 deletions
+5 -3
View File
@@ -183,17 +183,19 @@ function ProductCard({
) : (
<>
<button
className={`quick-add-btn ${isOutOfStock ? "disabled" : ""}`}
className={`quick-add-btn ${isOutOfStock || isComingSoon ? "disabled" : ""}`}
onClick={handleQuickAddClick}
disabled={isOutOfStock}
disabled={isOutOfStock || isComingSoon}
style={
categoryColor && !isOutOfStock
categoryColor && !isOutOfStock && !isComingSoon
? { background: categoryColor, color: getTextColor(categoryColor) }
: undefined
}
>
{isOutOfStock
? "Rupture de stock"
: isComingSoon
? "Bientôt disponible"
: "Ajouter rapidement"}
</button>
@@ -306,12 +306,14 @@ function ProductDetail() {
</div>
<button
className={`add-to-cart-button ${isOutOfStock || selectedGrams === null ? "disabled" : ""}`}
className={`add-to-cart-button ${isOutOfStock || isComingSoon || selectedGrams === null ? "disabled" : ""}`}
onClick={handleAddToCart}
disabled={isOutOfStock || selectedGrams === null}
disabled={isOutOfStock || isComingSoon || selectedGrams === null}
>
{isOutOfStock
? "Rupture de stock"
: isComingSoon
? "Bientôt disponible"
: "Ajouter au panier"}
</button>
</div>