first commit
This commit is contained in:
commit
5927d8e937
137 files changed
+8126
No files matched your search
@@ -0,0 +1,78 @@
|
||||
import React from "react";
|
||||
import Image from 'next/image';
|
||||
import Head from "next/head";
|
||||
import style from '../styles/ToutSavoir.module.css'
|
||||
|
||||
|
||||
import test from '../public/images/coffret-the-PhotoRoom.webp';
|
||||
import prisma from "../lib/prisma";
|
||||
|
||||
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 (
|
||||
<>
|
||||
<Head>
|
||||
<title>Tout savoir</title>
|
||||
<meta name="description" content="Tout savoir" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="googlebot" content="index, follow" />
|
||||
<meta name="googlebot-news" content="index, follow" />
|
||||
<meta name="slurp" content="index, follow" />
|
||||
<meta name="msnbot" content="index, follow" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
||||
</Head>
|
||||
{/* backgroundImagePath={'/images/ugh.png'} */}
|
||||
<div className="body-content">
|
||||
<h1 className="text-center mt-3">Tout savoir sur le jeu concours</h1>
|
||||
<div className="container">
|
||||
<p className="mt-5 text-center">
|
||||
Le jeu concours vous est proposé à l'occasion de ...
|
||||
</p>
|
||||
<div className="row">
|
||||
{produits.map((produit: Produit) => {
|
||||
return <div className="col-6 col-lg-3 d-flex justify-content-center my-2 my-lg-3" key={produit.id}>
|
||||
<div className={`${style.aCard} card`}>
|
||||
<Image
|
||||
className="card-img-top" src={test}
|
||||
width="286"
|
||||
height="180"
|
||||
alt="produit"
|
||||
/>
|
||||
<div className="card-body">
|
||||
<h5 className="card-title">{produit.nomProduit}</h5>
|
||||
<p className="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ToutSavoir;
|
||||
Reference in new issue
Block a user