add - images to products

feature/page-admin
unknown 4 years ago
parent 426d4a5fc1
commit 4e97b2b6db

@ -27,6 +27,7 @@ type Produit = {
actif: boolean;
nomProduit: string;
prixTtc: number;
image: string;
}
const ToutSavoir = ({ produits }: Props) => {
@ -65,12 +66,14 @@ const ToutSavoir = ({ produits }: Props) => {
{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`}>
<div className="d-flex justify-content-center">
<Image
className="card-img-top" src={test}
className="card-img-top" src={produit.image}
width="286"
height="180"
alt="produit"
/>
</div>
<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>

@ -80,6 +80,7 @@ model Produit {
actif Boolean?
nomProduit String?
prixTtc Int?
image String?
refGain Gain[]
}

@ -4,21 +4,25 @@ export const produitsData: Prisma.ProduitCreateInput[] = [
{
nomProduit: 'Grand coffret découverte',
prixTtc: 69,
image: '/images/cadeau.webp',
},
{
nomProduit: 'Coffret découverte',
prixTtc: 39,
image: '/images/cadeau.webp',
},
{
nomProduit: 'Thé signature',
prixTtc: 10,
image: '/images/cadeau.webp',
},
{
nomProduit: 'Thé détox',
prixTtc: 6,
image: '/images/cadeau.webp',
},
{
nomProduit: 'Infuseur à thé',
prixTtc: 3,
image: '/images/cadeau.webp',
}]

@ -1,3 +1,6 @@
.aCard {
width:200px;
}
.aCard img {
width:fit-content;
}
Loading…
Cancel
Save