chore: update

This commit is contained in:
2026-03-03 23:42:23 +01:00
parent 52b059fafa
commit 0073f80a48
95 changed files with 2720 additions and 40619 deletions
@@ -18,7 +18,7 @@ import {
Video as VideoIcon,
Play,
} from "lucide-react";
import type { Product } from "../api/api_admin_types"; // ✅ CORRIGÉ
import type { Product, ProductPrice } from "../api/api_types";
import "./ProductModal.css";
interface ProductDetailsModalProps {
@@ -169,7 +169,7 @@ const ProductDetailsModal: React.FC<ProductDetailsModalProps> = ({
{/* Miniatures */}
{product.media && product.media.length > 1 && (
<div className="media-thumbnails">
{product.media.map((media, index) => (
{product.media.map((media: { url: string; type: string }, index: number) => (
<button
key={index}
className={`thumbnail ${index === currentMediaIndex ? "active" : ""}`}
@@ -247,7 +247,7 @@ const ProductDetailsModal: React.FC<ProductDetailsModalProps> = ({
</h3>
<div className="prices-table">
{product.prices && product.prices.length > 0 ? (
product.prices.map((price, index) => (
product.prices.map((price: ProductPrice, index: number) => (
<div
key={index}
className="price-row-display"
@@ -286,12 +286,12 @@ const ProductDetailsModal: React.FC<ProductDetailsModalProps> = ({
<span>
{
product.media.filter(
(m) => m.type === "image",
(m: { url: string; type: string }) => m.type === "image",
).length
}{" "}
Image
{product.media.filter(
(m) => m.type === "image",
(m: { url: string; type: string }) => m.type === "image",
).length > 1
? "s"
: ""}
@@ -302,12 +302,12 @@ const ProductDetailsModal: React.FC<ProductDetailsModalProps> = ({
<span>
{
product.media.filter(
(m) => m.type === "video",
(m: { url: string; type: string }) => m.type === "video",
).length
}{" "}
Vidéo
{product.media.filter(
(m) => m.type === "video",
(m: { url: string; type: string }) => m.type === "video",
).length > 1
? "s"
: ""}