diff --git a/data/products.json b/data/products.json index 2492312..6840c60 100644 --- a/data/products.json +++ b/data/products.json @@ -8,6 +8,26 @@ "date": "12-03-2013", "price": 10, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -18,6 +38,26 @@ "date": "12-03-2013", "price": 20, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -28,6 +68,26 @@ "date": "12-03-2013", "price": 30, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -38,6 +98,26 @@ "date": "12-03-2013", "price": 40, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -48,6 +128,26 @@ "date": "12-03-2013", "price": 50, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -58,6 +158,26 @@ "date": "12-03-2013", "price": 60, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -68,6 +188,26 @@ "date": "12-03-2013", "price": 70, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -78,6 +218,26 @@ "date": "12-03-2013", "price": 80, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -88,6 +248,26 @@ "date": "12-03-2013", "price": 90, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" }, { @@ -98,6 +278,26 @@ "date": "12-03-2013", "price": 100, "comprimes": "30 comprimes", + "utilisation": "6 ans et plus", + "mode d'emploi": "1 par jour", + "indications":[ + { + "name": "reninforce immune system" + }, + { + "name": "anti oxydant" + }, + { + "name": "fatigue passagere" + } + + ], + "composantes": [ + { + "composanteActive": "Zinc", + "concentration": "200mg" + } + ], "image": "https://images.unsplash.com/photo-1510798831971-661eb04b3739?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=400&q=80" } ], diff --git a/next.config.js b/next.config.js index 47a26cf..7f87d3f 100644 --- a/next.config.js +++ b/next.config.js @@ -1,5 +1,13 @@ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, + images: { + remotePatterns: [ + { + protocol: 'https', + hostname: 'images.unsplash.com', + }, + ], + }, }; module.exports = nextConfig; diff --git a/pages/products/[id].js b/pages/products/[id].js index 7e59927..85ab5b6 100644 --- a/pages/products/[id].js +++ b/pages/products/[id].js @@ -1,7 +1,20 @@ import { useEffect, useState } from "react"; +import { Button, Grid, Center} from "@mantine/core"; +import { BadgeCard } from "@/src/components/productsComponents/mainProd"; import Link from "next/link"; +import { TableScrollArea } from "@/src/components/productsComponents/inPordTable"; +import { TableScrollAr } from "@/src/components/productsComponents/inTable"; +import Image from "next/image"; const Product = ({ id, data, similarProds }) => { + const styles={ + button: { +padding: "8px",backgroundColor: "transparent", textDecoration: "none",color: "white", border: "none" + }, + buttonWrapper: { + margin: "5px" + } + } const [quantity, setQuantity] = useState(1); const [cart, setCart] = useState([]); @@ -46,45 +59,59 @@ const Product = ({ id, data, similarProds }) => { } }; + const {composantes, indications,image}=data return (
{JSON.stringify(product)}
-
-
-
Composante Active | +Concentration par comprimes | +
---|
Indication | +
---|