diff --git a/pages/tout-savoir.tsx b/pages/tout-savoir.tsx index da818f1..d8b2c1f 100644 --- a/pages/tout-savoir.tsx +++ b/pages/tout-savoir.tsx @@ -5,11 +5,34 @@ import style from '../styles/ToutSavoir.module.css' import test from '../public/images/coffret-the-PhotoRoom.webp'; +import prisma from "../lib/prisma"; -const ToutSavoir = () => { +export async function getStaticProps() { + const produits = await prisma.produit.findMany(); + + return { + props: { + produits, + }, + } +} + +type Props = { + produits: Produit[]; +} + +type Produit = { + id: number; + actif: boolean; + nomProduit: string; + prixTtc: number; +} + +const ToutSavoir = ({ produits }: Props) => { + console.log('p', produits); return ( - <> + <>
- Le jeu concours vous est proposé à l'occasion de ... -
-Some quick example text to build on the card title and make up the bulk of the card's content.
-Some quick example text to build on the card title and make up the bulk of the card's content.
-Some quick example text to build on the card title and make up the bulk of the card's content.
-+ Le jeu concours vous est proposé à l'occasion de ... +
+Some quick example text to build on the card title and make up the bulk of the card's content.