diff --git a/src/app/page.tsx b/src/app/page.tsx index 007a826..11e2c95 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,19 +2,33 @@ import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import ReactLenis from "lenis/react"; +import { useState } from "react"; import ContactSplitForm from '@/components/sections/contact/ContactSplitForm'; import FaqDouble from '@/components/sections/faq/FaqDouble'; import FeatureCardEight from '@/components/sections/feature/FeatureCardEight'; import FooterMedia from '@/components/sections/footer/FooterMedia'; import HeroSplitDualMedia from '@/components/sections/hero/HeroSplitDualMedia'; import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered'; -import PricingCardOne from '@/components/sections/pricing/PricingCardOne'; +import PricingCardNine from '@/components/sections/pricing/PricingCardNine'; import ProductCardThree from '@/components/sections/product/ProductCardThree'; import SplitAbout from '@/components/sections/about/SplitAbout'; import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCardSix'; +import ProductCart from '@/components/ecommerce/cart/ProductCart'; import { Box } from "lucide-react"; export default function LandingPage() { + const [cartOpen, setCartOpen] = useState(false); + const [cartItems, setCartItems] = useState([]); + + const addToCart = (product: any) => { + setCartItems(prev => { + const exists = prev.find(i => i.id === product.id); + if (exists) return prev.map(i => i.id === product.id ? { ...i, quantity: i.quantity + 1 } : i); + return [...prev, { ...product, quantity: 1 }]; + }); + setCartOpen(true); + }; + return ( + setCartOpen(false)} + items={cartItems} + total={`$${cartItems.reduce((acc, item) => acc + (parseFloat(item.price.replace('$', '')) || 0) * item.quantity, 0).toFixed(2)}`} + onRemove={(id) => setCartItems(prev => prev.filter(i => i.id !== id))} + onQuantityChange={(id, qty) => setCartItems(prev => prev.map(i => i.id === id ? {...i, quantity: qty} : i))} + /> +
-
@@ -133,9 +153,6 @@ export default function LandingPage() { testimonials={[ { id: "1", name: "Alex R.", handle: "@alexgamer", testimonial: "The best selection of free games.", imageSrc: "http://img.b2bpic.net/free-photo/smiling-young-sporty-man-with-wrist-bandage-wearing-headphones-pretending-running-isolated-pink-wall_141793-78519.jpg" }, { id: "2", name: "Jamie L.", handle: "@jamieplays", testimonial: "Seamless performance.", imageSrc: "http://img.b2bpic.net/free-photo/videographer-smiling-camera-working-computer-editing-video-footage-audio-app-sitting-mo_482257-2649.jpg" }, - { id: "3", name: "Taylor S.", handle: "@tayplays", testimonial: "Love the curated lists.", imageSrc: "http://img.b2bpic.net/free-photo/portrait-man-rgb-lit-studio-streaming-multiplayer-game_482257-103579.jpg" }, - { id: "4", name: "Morgan D.", handle: "@morgangamer", testimonial: "Great community variety.", imageSrc: "http://img.b2bpic.net/free-photo/skilled-businessman-his-office-desk-working-report-writing-data-analysis-deadline_482257-133346.jpg" }, - { id: "5", name: "Chris B.", handle: "@chrisplays", testimonial: "Zero issues, pure gaming.", imageSrc: "http://img.b2bpic.net/free-photo/male-athlete-standing-with-basketball-plastic-bottle-soft-blue-background_23-2148203716.jpg" }, ]} title="Player Voices" description="Joining thousands of happy gamers." @@ -148,8 +165,7 @@ export default function LandingPage() { useInvertedBackground={true} faqs={[ { id: "f1", title: "Are these games really free?", content: "Yes, our platform is ad-supported." }, - { id: "f2", title: "Do I need to download games?", content: "Never, play in browser." }, - { id: "f3", title: "Is mobile play supported?", content: "Yes, fully responsive." }, + { id: "f2", title: "How do I purchase premium?", content: "Click the Upgrade Now button on our pricing section to use our secure checkout." }, ]} title="Frequently Asked Questions" description="Got questions? We've got answers." @@ -176,7 +192,7 @@ export default function LandingPage() { imageSrc="http://img.b2bpic.net/free-photo/beautiful-optical-fiber-detail_23-2149182559.jpg" logoText="GameVault" columns={[ - { title: "Platform", items: [{ label: "About", href: "#about" }, { label: "Games", href: "#features" }] }, + { title: "Platform", items: [{ label: "About", href: "#about" }, { label: "Games", href: "#features" }, { label: "Pricing", href: "#pricing" }] }, { title: "Resources", items: [{ label: "FAQ", href: "#faq" }, { label: "Contact", href: "#contact" }] }, ]} /> @@ -184,4 +200,4 @@ export default function LandingPage() {
); -} +} \ No newline at end of file