diff --git a/src/app/produits/page.tsx b/src/app/produits/page.tsx index 0286c37..af189ab 100644 --- a/src/app/produits/page.tsx +++ b/src/app/produits/page.tsx @@ -1,27 +1,48 @@ import { Container } from "@/components/Container"; -import Products from "@/components/products"; +import Products, { Product } from "@/components/products"; import Image from "next/image"; +const productsData: Product[] = Products; + export default function ArticlesPage() { + if (!productsData || productsData.length === 0) { + return ( + +

+ Plus de stock disponible +

+
+ ); + } + return (
-

Nos Articles

- +

+ Nos Articles +

+
- {Products.map((article, index) => ( -
+ {productsData.map((product, index) => ( +
{article.title} -

{article.title}

-

{article.description}

+

+ {product.title} +

+

+ {product.description} +

Voir l'article @@ -32,4 +53,4 @@ export default function ArticlesPage() {
); -} +} \ No newline at end of file diff --git a/src/components/products.js b/src/components/products.js deleted file mode 100644 index 7ce002a..0000000 --- a/src/components/products.js +++ /dev/null @@ -1,3 +0,0 @@ -const Products = []; - -export default Products; diff --git a/src/components/products.ts b/src/components/products.ts new file mode 100644 index 0000000..95fa6cb --- /dev/null +++ b/src/components/products.ts @@ -0,0 +1,18 @@ +export type Product = { + imageUrl: string; + title: string; + description: string; + url: string; +}; + +const Products: Product[] = []; + +export default Products; + +// Sample product data +// { +// imageUrl: "", +// title: "", +// description: "", +// url: "", +// }, \ No newline at end of file