3 Commits

Author SHA1 Message Date
d132af22ff Update src/app/page.tsx 2026-05-05 23:50:04 +00:00
6137c6ceb5 Update src/app/page.tsx 2026-05-05 23:49:40 +00:00
6ce3774d62 Merge version_1 into main
Merge version_1 into main
2026-05-05 23:42:20 +00:00

View File

@@ -2,6 +2,7 @@
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import ReactLenis from "lenis/react"; import ReactLenis from "lenis/react";
import { useState } from "react";
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm'; import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
import FeatureCardEight from '@/components/sections/feature/FeatureCardEight'; import FeatureCardEight from '@/components/sections/feature/FeatureCardEight';
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal'; import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
@@ -11,9 +12,20 @@ import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloating
import ProductCardThree from '@/components/sections/product/ProductCardThree'; import ProductCardThree from '@/components/sections/product/ProductCardThree';
import TestimonialCardSixteen from '@/components/sections/testimonial/TestimonialCardSixteen'; import TestimonialCardSixteen from '@/components/sections/testimonial/TestimonialCardSixteen';
import TextAbout from '@/components/sections/about/TextAbout'; import TextAbout from '@/components/sections/about/TextAbout';
import ProductCart from '@/components/ecommerce/cart/ProductCart';
import { Leaf, Sparkles } from "lucide-react"; import { Leaf, Sparkles } from "lucide-react";
export default function LandingPage() { export default function LandingPage() {
const [isCartOpen, setIsCartOpen] = useState(false);
const [cartItems, setCartItems] = useState<Array<{ id: string, name: string, price: string, quantity: number, imageSrc: string }>>([
{ id: "p1", name: "Organic Red Apples", price: "$4.99", quantity: 1, imageSrc: "http://img.b2bpic.net/free-photo/beautifully-arranged-apples-shop_23-2150713426.jpg?_wi=1" }
]);
const handleWhatsAppCheckout = () => {
const message = `New Order from FreshMarket:\n${cartItems.map(item => `- ${item.name} (x${item.quantity}) - ${item.price}`).join('\n')}\nTotal: $${cartItems.reduce((acc, item) => acc + parseFloat(item.price.replace('$', '')) * item.quantity, 0).toFixed(2)}`;
window.open(`https://wa.me/1234567890?text=${encodeURIComponent(message)}`, '_blank');
};
return ( return (
<ThemeProvider <ThemeProvider
defaultButtonVariant="bounce-effect" defaultButtonVariant="bounce-effect"
@@ -39,10 +51,18 @@ export default function LandingPage() {
{ name: "Contact", id: "contact" }, { name: "Contact", id: "contact" },
]} ]}
brandName="FreshMarket" brandName="FreshMarket"
button={{ text: "Shop Now" }} button={{ text: "Cart", onClick: () => setIsCartOpen(true) }}
/> />
</div> </div>
<ProductCart
isOpen={isCartOpen}
onClose={() => setIsCartOpen(false)}
items={cartItems}
total={cartItems.reduce((acc, item) => acc + parseFloat(item.price.replace('$', '')) * item.quantity, 0).toFixed(2)}
buttons={[{ text: "Checkout via WhatsApp", onClick: handleWhatsAppCheckout }]}
/>
<div id="hero" data-section="hero"> <div id="hero" data-section="hero">
<HeroSplitDualMedia <HeroSplitDualMedia
background={{ variant: "gradient-bars" }} background={{ variant: "gradient-bars" }}
@@ -95,7 +115,7 @@ export default function LandingPage() {
gridVariant="three-columns-all-equal-width" gridVariant="three-columns-all-equal-width"
useInvertedBackground={false} useInvertedBackground={false}
products={[ products={[
{ id: "p1", name: "Organic Red Apples", price: "$4.99/kg", imageSrc: "http://img.b2bpic.net/free-photo/beautifully-arranged-apples-shop_23-2150713426.jpg" }, { id: "p1", name: "Organic Red Apples", price: "$4.99/kg", imageSrc: "http://img.b2bpic.net/free-photo/beautifully-arranged-apples-shop_23-2150713426.jpg?_wi=2" },
{ id: "p2", name: "Fresh Kale", price: "$2.50/bunch", imageSrc: "http://img.b2bpic.net/free-photo/broccoli-inflorescences-laid-out-gray-background-top-view-healthy-vegetable-products-food-delivery-from-farms_166373-1849.jpg" }, { id: "p2", name: "Fresh Kale", price: "$2.50/bunch", imageSrc: "http://img.b2bpic.net/free-photo/broccoli-inflorescences-laid-out-gray-background-top-view-healthy-vegetable-products-food-delivery-from-farms_166373-1849.jpg" },
{ id: "p3", name: "Artisan Sourdough Bread", price: "$6.00", imageSrc: "http://img.b2bpic.net/free-photo/close-up-freshly-baked-loaf-bread_23-2152015863.jpg" } { id: "p3", name: "Artisan Sourdough Bread", price: "$6.00", imageSrc: "http://img.b2bpic.net/free-photo/close-up-freshly-baked-loaf-bread_23-2152015863.jpg" }
]} ]}