From 7d2f9682338c3e0b63385623ac93ef6e70171f6d Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 07:41:45 +0000 Subject: [PATCH] Update src/app/page.tsx --- src/app/page.tsx | 89 +++++++++++++++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 31 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index d5f1002..ac755d4 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,9 +9,26 @@ import FeatureCardOne from "@/components/sections/feature/FeatureCardOne"; import TestimonialCardSix from "@/components/sections/testimonial/TestimonialCardSix"; import ContactText from "@/components/sections/contact/ContactText"; import FooterBaseCard from "@/components/sections/footer/FooterBaseCard"; -import { CheckCircle, Star, Zap } from "lucide-react"; +import { CheckCircle, Star, Zap, MapPin, Phone, Mail } from "lucide-react"; +import { useState } from "react"; export default function LandingPage() { + const [cartItems, setCartItems] = useState>([]); + + const handleAddToCart = (productId: string, productName: string, productPrice: string) => { + const existingItem = cartItems.find((item) => item.id === productId); + if (existingItem) { + setCartItems( + cartItems.map((item) => + item.id === productId ? { ...item, quantity: item.quantity + 1 } : item + ) + ); + } else { + setCartItems([...cartItems, { id: productId, name: productName, price: productPrice, quantity: 1 }]); + } + alert(`${productName} ajouté au panier!`); + }; + return ( handleAddToCart("1", "Photocopieur Multifonction XL2000", "2 490 €"), + }, { - id: "2", brand: "iNKCO Pro", name: "Imprimante Laser Couleur PRO", price: "1 290 €", rating: 5, reviewCount: "35", imageSrc: - "http://img.b2bpic.net/free-photo/dishwasher-door-half-open-close-detail-macro-view_169016-70928.jpg", imageAlt: "professional color laser printer"}, + id: "2", brand: "iNKCO Pro", name: "Imprimante Laser Couleur PRO", price: "1 290 €", rating: 5, + reviewCount: "35", imageSrc: + "http://img.b2bpic.net/free-photo/dishwasher-door-half-open-close-detail-macro-view_169016-70928.jpg", imageAlt: "professional color laser printer", onProductClick: () => handleAddToCart("2", "Imprimante Laser Couleur PRO", "1 290 €"), + }, { - id: "3", brand: "iNKCO Pro", name: "Scanner Professionnel haute Résolution", price: "890 €", rating: 5, reviewCount: "28", imageSrc: - "http://img.b2bpic.net/free-photo/women-work-office-using-printer_23-2149457013.jpg", imageAlt: "professional office document scanner"}, + id: "3", brand: "iNKCO Pro", name: "Scanner Professionnel haute Résolution", price: "890 €", rating: 5, + reviewCount: "28", imageSrc: + "http://img.b2bpic.net/free-photo/women-work-office-using-printer_23-2149457013.jpg", imageAlt: "professional office document scanner", onProductClick: () => handleAddToCart("3", "Scanner Professionnel haute Résolution", "890 €"), + }, + ]} + buttons={[ + { text: "Voir plus de produits", href: "#products" }, + { text: "Commander", href: "contact" }, ]} /> @@ -151,7 +178,7 @@ export default function LandingPage() {