feat: update multiple tomtom keys and switch tomtom key and add comming soon button
This commit is contained in:
@@ -26,6 +26,7 @@ interface ProductCardProps {
|
||||
hasVideo?: boolean;
|
||||
videoUrl?: string; // ✨ Nouveau prop pour l'URL de la vidéo
|
||||
categoryColor?: string;
|
||||
coming_soon?: boolean;
|
||||
}
|
||||
|
||||
function ProductCard({
|
||||
@@ -40,6 +41,7 @@ function ProductCard({
|
||||
hasVideo = false,
|
||||
videoUrl,
|
||||
categoryColor,
|
||||
coming_soon,
|
||||
}: ProductCardProps) {
|
||||
const navigate = useNavigate();
|
||||
const { addToCart } = useCart();
|
||||
@@ -52,6 +54,7 @@ function ProductCard({
|
||||
const [showVideo, setShowVideo] = useState(false); // ✨ État pour afficher/masquer la vidéo
|
||||
|
||||
const isOutOfStock = stock === 0;
|
||||
const isComingSoon = coming_soon === true;
|
||||
const normalizedCategory = (category || "autre").toLowerCase().trim();
|
||||
|
||||
const handleDetailsClick = (e: React.MouseEvent) => {
|
||||
@@ -156,6 +159,9 @@ function ProductCard({
|
||||
{isOutOfStock && (
|
||||
<div className="sold-out-overlay">SOLD OUT</div>
|
||||
)}
|
||||
{isComingSoon && !isOutOfStock && (
|
||||
<div className="coming-soon-overlay">À VENIR</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="product-info">
|
||||
|
||||
Reference in New Issue
Block a user