You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
The_Tip_Top/pages/tout-savoir.tsx

88 lines
3.6 KiB

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";
import Link from "next/link";
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 mt-3">
<p className="mt-5 text-center">
Le jeu concours vous est proposé à l'occasion de l'ouverture de notre 10e boutique à Nice ! Pour participer, il vous suffit de faire un achat supérieur à 49€, un code vous sera fourni sur votre facture à saisir <Link href="/"><a>ici</a></Link>
</p>
<h2 className="text-center">Le gros lot</h2>
<div className="row">
<div className="col-12 col-lg-4">
Image
</div>
<div className="col-12 col-lg-8">
En participant au moins une fois à notre jeu concours, vous vous qualifiez pour gagner le gros lot : <b>1 an de thé</b> d'une valeur de 360€ !
</div>
</div>
<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;