diff --git a/src/app/page.tsx b/src/app/page.tsx index 5ad2ac9..c4a0d3f 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,6 +2,7 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import ReactLenis from "lenis/react"; +import { useState } from "react"; import ContactSplit from '@/components/sections/contact/ContactSplit'; import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia'; import FeatureCardEight from '@/components/sections/feature/FeatureCardEight'; @@ -12,9 +13,18 @@ import MetricSplitMediaAbout from '@/components/sections/about/MetricSplitMediaA import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; import ProductCardOne from '@/components/sections/product/ProductCardOne'; import TestimonialCardTwo from '@/components/sections/testimonial/TestimonialCardTwo'; -import { Facebook, Instagram, Mail, Phone } from "lucide-react"; +import ProductCart from '@/components/ecommerce/cart/ProductCart'; +import { Facebook, Instagram, Mail, Phone, ShoppingCart } from "lucide-react"; export default function LandingPage() { + const [isCartOpen, setIsCartOpen] = useState(false); + const [cartItems, setCartItems] = useState>([]); + + const addToCart = (product: any) => { + setCartItems(prev => [...prev, { ...product, quantity: 1 }]); + setIsCartOpen(true); + }; + return ( - + setIsCartOpen(false)} + items={cartItems} + total={`${cartItems.reduce((acc, item) => acc + parseInt(item.price), 0)} ETB`} + buttons={[{ text: "Checkout", onClick: () => alert("Redirecting to checkout...") }]} + /> + -
- -
+
+ +
-
- -
+
+ +
-
- -
+
+ addToCart({ id: "p1", name: "Heritage Gold", price: "850", imageSrc: "http://img.b2bpic.net/free-photo/perfume-bottle_1203-7394.jpg" }) }, + { id: "p2", name: "Abyssinian Night", price: "1200 ETB", imageSrc: "http://img.b2bpic.net/free-photo/organic-cosmetic-product-with-dreamy-aesthetic-fresh-background_23-2151382818.jpg", onProductClick: () => addToCart({ id: "p2", name: "Abyssinian Night", price: "1200", imageSrc: "http://img.b2bpic.net/free-photo/organic-cosmetic-product-with-dreamy-aesthetic-fresh-background_23-2151382818.jpg" }) }, + ]} + title="Our Fragrances" + description="Discover our handpicked collection of exquisite perfumes." + /> +
-
- -
+
+ +
-
- -
+
+ +
-
- -
+
+ +
-
- -
+
+ +
-
- -
- - +
); -} +} \ No newline at end of file