chore: update
This commit is contained in:
@@ -13,6 +13,7 @@ import {
|
||||
faBars,
|
||||
faTimes,
|
||||
faBell,
|
||||
faGift,
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
import { faTelegram } from "@fortawesome/free-brands-svg-icons";
|
||||
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
||||
@@ -91,6 +92,7 @@ function Navbar() {
|
||||
{ id: "panier", label: "Mon Panier", icon: faShoppingCart, path: "/user/panier" },
|
||||
{ id: "suivi", label: "Suivi Livraison", icon: faTruck, path: "/user/suivi-livraison" },
|
||||
{ id: "historique", label: "Historique", icon: faClockRotateLeft, path: "/user/consultation-historique" },
|
||||
{ id: "parrainage", label: "Parrainage", icon: faGift, path: "/user/parrainage" },
|
||||
];
|
||||
|
||||
const toggleMenu = () => setIsMenuOpen((v) => !v);
|
||||
|
||||
@@ -14,6 +14,7 @@ interface ProductCardProps {
|
||||
prices?: Array<{ quantity: number; price: number }>;
|
||||
hasVideo?: boolean;
|
||||
videoUrl?: string; // ✨ Nouveau prop pour l'URL de la vidéo
|
||||
categoryColor?: string;
|
||||
}
|
||||
|
||||
function ProductCard({
|
||||
@@ -27,6 +28,7 @@ function ProductCard({
|
||||
prices,
|
||||
hasVideo = false,
|
||||
videoUrl,
|
||||
categoryColor,
|
||||
}: ProductCardProps) {
|
||||
const navigate = useNavigate();
|
||||
const { addToCart } = useCart();
|
||||
@@ -162,6 +164,11 @@ function ProductCard({
|
||||
className={`quick-add-btn ${isOutOfStock ? "disabled" : ""}`}
|
||||
onClick={handleQuickAddClick}
|
||||
disabled={isOutOfStock}
|
||||
style={
|
||||
categoryColor && !isOutOfStock
|
||||
? { background: categoryColor }
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{isOutOfStock
|
||||
? "Rupture de stock"
|
||||
@@ -174,6 +181,11 @@ function ProductCard({
|
||||
value={selectedQuantity ?? ""}
|
||||
onChange={handleQuantitySelect}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
style={
|
||||
categoryColor
|
||||
? { borderColor: categoryColor }
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
<option value="">Choisir une quantité</option>
|
||||
{prices.map((priceOption) => (
|
||||
|
||||
Reference in New Issue
Block a user