Merge version_3 into main #5
@@ -1,12 +1,19 @@
|
||||
"use client";
|
||||
|
||||
import ReactLenis from "lenis/react";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import { useBlogPosts } from "@/hooks/useBlogPosts";
|
||||
|
||||
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
|
||||
import FooterMedia from '@/components/sections/footer/FooterMedia';
|
||||
import BlogCardThree from '@/components/sections/blog/BlogCardThree';
|
||||
import BlogCardTwo from '@/components/sections/blog/BlogCardTwo';
|
||||
|
||||
const navItems = [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Products", id: "/#products" },
|
||||
{ name: "About", id: "/#about" },
|
||||
{ name: "Testimonials", id: "/#testimonials" },
|
||||
{ name: "Contact", id: "/#contact" },
|
||||
];
|
||||
|
||||
export default function BlogPage() {
|
||||
const { posts, isLoading } = useBlogPosts();
|
||||
@@ -24,34 +31,34 @@ export default function BlogPage() {
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleApple
|
||||
brandName="Persik"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" },
|
||||
{ name: "About", id: "#about" },
|
||||
{ name: "Testimonials", id: "#testimonials" },
|
||||
{ name: "Contact", id: "#contact" },
|
||||
]}
|
||||
navItems={navItems}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<main>
|
||||
{isLoading ? (
|
||||
<div className="w-content-width mx-auto py-20 text-center">
|
||||
<div className="w-full mx-auto py-40 text-center">
|
||||
<p className="text-foreground">Loading posts...</p>
|
||||
</div>
|
||||
) : (
|
||||
<BlogCardThree
|
||||
blogs={posts}
|
||||
title="Featured Articles"
|
||||
description="Explore our latest insights"
|
||||
animationType="slide-up"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground={false}
|
||||
carouselMode="buttons"
|
||||
/>
|
||||
<div id="blog-posts" data-section="blog-posts">
|
||||
<BlogCardTwo
|
||||
blogs={posts}
|
||||
title="From Our Blog"
|
||||
description="Explore our latest floral tips, stories, and insights."
|
||||
animationType="slide-up"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground={false}
|
||||
carouselMode="buttons"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</main>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia
|
||||
imageSrc="https://img.b2bpic.net/free-photo/woman-holds-festive-flower-arrangement-with-bright-chrysanthemum-flowers_169016-51483.jpg?_wi=2"
|
||||
imageAlt="Soft focus background image of various flowers"
|
||||
@@ -67,20 +74,20 @@ export default function BlogPage() {
|
||||
},
|
||||
{
|
||||
title: "About Us", items: [
|
||||
{ label: "Our Story", href: "#about" },
|
||||
{ label: "Testimonials", href: "#testimonials" },
|
||||
{ label: "Our Story", href: "/#about" },
|
||||
{ label: "Testimonials", href: "/#testimonials" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Support", items: [
|
||||
{ label: "Contact", href: "#contact" },
|
||||
{ label: "Contact", href: "/#contact" },
|
||||
{ label: "Delivery Info", href: "https://example.com/delivery" },
|
||||
{ label: "Privacy Policy", href: "https://example.com/privacy" },
|
||||
],
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</ReactLenis>
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
1387
src/app/layout.tsx
1387
src/app/layout.tsx
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@ export default function LandingPage() {
|
||||
brandName="Persik"
|
||||
navItems={[
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" },
|
||||
{ name: "Products", id: "#products" },
|
||||
{ name: "About", id: "#about" },
|
||||
{ name: "Testimonials", id: "#testimonials" },
|
||||
{ name: "Contact", id: "#contact" },
|
||||
@@ -121,8 +121,8 @@ export default function LandingPage() {
|
||||
copyrightText="© 2024 Persik | All rights reserved"
|
||||
columns={[
|
||||
{ title: "Shop", items: [{ label: "Bouquets", href: "/shop" }, { label: "Arrangements", href: "/shop" }, { label: "Gifts", href: "/shop" }] },
|
||||
{ title: "About Us", items: [{ label: "Our Story", href: "#about" }, { label: "Testimonials", href: "#testimonials" }] },
|
||||
{ title: "Support", items: [{ label: "Contact", href: "#contact" }, { label: "Delivery Info", href: "https://example.com/delivery" }, { label: "Privacy Policy", href: "https://example.com/privacy" }] },
|
||||
{ title: "About Us", items: [{ label: "Our Story", href: "/#about" }, { label: "Testimonials", href: "/#testimonials" }] },
|
||||
{ title: "Support", items: [{ label: "Contact", href: "/#contact" }, { label: "Delivery Info", href: "https://example.com/delivery" }, { label: "Privacy Policy", href: "https://example.com/privacy" }] },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
|
||||
import React, { use, useCallback } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import ReactLenis from "lenis/react";
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import NavbarStyleApple from "@/components/navbar/NavbarStyleApple/NavbarStyleApple";
|
||||
import FooterMedia from '@/components/sections/footer/FooterMedia';
|
||||
import ProductDetailCard from "@/components/ecommerce/productDetail/ProductDetailCard";
|
||||
import FeatureCardTwentyOne from "@/components/sections/feature/FeatureCardTwentyOne";
|
||||
import ProductCart from "@/components/ecommerce/cart/ProductCart";
|
||||
import { useProductDetail } from "@/hooks/useProductDetail";
|
||||
import { useCart } from "@/hooks/useCart";
|
||||
@@ -16,6 +15,14 @@ interface ProductPageProps {
|
||||
params: Promise<{ id: string }>;
|
||||
}
|
||||
|
||||
const navItems = [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Products", id: "/shop" },
|
||||
{ name: "About", id: "/#about" },
|
||||
{ name: "Testimonials", id: "/#testimonials" },
|
||||
{ name: "Contact", id: "/#contact" },
|
||||
];
|
||||
|
||||
export default function ProductPage({ params }: ProductPageProps) {
|
||||
const { id } = use(params);
|
||||
const router = useRouter();
|
||||
@@ -25,8 +32,6 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
isLoading,
|
||||
images,
|
||||
meta,
|
||||
variants,
|
||||
quantityVariant,
|
||||
selectedQuantity,
|
||||
createCartItem,
|
||||
} = useProductDetail(id);
|
||||
@@ -48,8 +53,9 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
const item = createCartItem();
|
||||
if (item) {
|
||||
addItem(item);
|
||||
setCartOpen(true);
|
||||
}
|
||||
}, [createCartItem, addItem]);
|
||||
}, [createCartItem, addItem, setCartOpen]);
|
||||
|
||||
const handleBuyNow = useCallback(() => {
|
||||
if (product) {
|
||||
@@ -66,22 +72,17 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||
}, [cartItems, checkout, getCheckoutItems]);
|
||||
|
||||
const cartCount = cartItems.length;
|
||||
const navbarProps = {
|
||||
brandName: "Persik", navItems: [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" },
|
||||
{ name: "About", id: "#about" },
|
||||
{ name: "Testimonials", id: "#testimonials" },
|
||||
{ name: "Contact", id: "#contact" }
|
||||
],
|
||||
button: { text: "Cart", onClick: () => setCartOpen(true) },
|
||||
brandName: "Persik", navItems: navItems,
|
||||
button: { text: `Cart (${cartCount})`, onClick: () => setCartOpen(true) },
|
||||
mobileNavContent: (
|
||||
<div className="flex flex-col gap-2 mt-4">
|
||||
<button
|
||||
onClick={() => setCartOpen(true)}
|
||||
className="w-full text-left p-2 rounded-md hover:bg-muted/50"
|
||||
>
|
||||
Cart
|
||||
Cart ({cartCount})
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
@@ -90,76 +91,59 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
const footerProps = {
|
||||
imageSrc: "https://img.b2bpic.net/free-photo/woman-holds-festive-flower-arrangement-with-bright-chrysanthemum-flowers_169016-51483.jpg?_wi=4", imageAlt: "Soft focus background image of various flowers", logoText: "Persik Flowers", copyrightText: "© 2024 Persik | All rights reserved", columns: [
|
||||
{ title: "Shop", items: [{ label: "Bouquets", href: "/shop" }, { label: "Arrangements", href: "/shop" }, { label: "Gifts", href: "/shop" }] },
|
||||
{ title: "About Us", items: [{ label: "Our Story", href: "#about" }, { label: "Testimonials", href: "#testimonials" }] },
|
||||
{ title: "Support", items: [{ label: "Contact", href: "#contact" }, { label: "Delivery Info", href: "https://example.com/delivery" }, { label: "Privacy Policy", href: "https://example.com/privacy" }] }
|
||||
{ title: "About Us", items: [{ label: "Our Story", href: "/#about" }, { label: "Testimonials", href: "/#testimonials" }] },
|
||||
{ title: "Support", items: [{ label: "Contact", href: "/#contact" }, { label: "Delivery Info", href: "https://example.com/delivery" }, { label: "Privacy Policy", href: "https://example.com/privacy" }] }
|
||||
]
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="elastic-effect"
|
||||
defaultTextAnimation="reveal-blur"
|
||||
borderRadius="soft"
|
||||
contentWidth="smallMedium"
|
||||
sizing="mediumSizeLargeTitles"
|
||||
background="none"
|
||||
cardStyle="gradient-bordered"
|
||||
primaryButtonStyle="diagonal-gradient"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<p className="text-foreground">Loading product...</p>
|
||||
</main>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
const renderContent = () => {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<p className="text-foreground">Loading product...</p>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (!product) {
|
||||
return (
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<div className="text-center">
|
||||
<p className="text-foreground mb-4">Product not found</p>
|
||||
<button
|
||||
onClick={() => router.push("/shop")}
|
||||
className="primary-button px-6 py-2 rounded-theme"
|
||||
>
|
||||
Back to Shop
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
if (!product) {
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="elastic-effect"
|
||||
defaultTextAnimation="reveal-blur"
|
||||
borderRadius="soft"
|
||||
contentWidth="smallMedium"
|
||||
sizing="mediumSizeLargeTitles"
|
||||
background="none"
|
||||
cardStyle="gradient-bordered"
|
||||
primaryButtonStyle="diagonal-gradient"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<div className="text-center">
|
||||
<p className="text-foreground mb-4">Product not found</p>
|
||||
<button
|
||||
onClick={() => router.push("/shop")}
|
||||
className="primary-button px-6 py-2 rounded-theme"
|
||||
>
|
||||
Back to Shop
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
<div id="product-detail" data-section="product-detail">
|
||||
<FeatureCardTwentyOne
|
||||
title={product.name}
|
||||
description={product.description}
|
||||
imageSrc={images[0]?.src || '/placeholders/placeholder1.webp'}
|
||||
imageAlt={images[0]?.alt || product.name}
|
||||
mediaPosition="left"
|
||||
useInvertedBackground={false}
|
||||
mediaAnimation="slide-up"
|
||||
accordionItems={[
|
||||
{ id: 'price', title: 'Price', content: product.price },
|
||||
...(meta.sku ? [{ id: 'sku', title: 'SKU', content: meta.sku }] : []),
|
||||
...(product.rating ? [{ id: 'rating', title: 'Rating', content: `${product.rating}/5` }] : []),
|
||||
]}
|
||||
buttons={[
|
||||
{ text: "Add To Cart", onClick: handleAddToCart },
|
||||
{ text: "Buy Now", onClick: handleBuyNow },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
@@ -174,50 +158,26 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
<div id="product-detail-card" data-section="product-detail-card">
|
||||
<ProductDetailCard
|
||||
layout="page"
|
||||
name={product.name}
|
||||
price={product.price}
|
||||
salePrice={meta.salePrice}
|
||||
rating={product.rating || 0}
|
||||
description={product.description}
|
||||
images={images}
|
||||
variants={variants.length > 0 ? variants : undefined}
|
||||
quantity={quantityVariant}
|
||||
ribbon={meta.ribbon}
|
||||
inventoryStatus={meta.inventoryStatus}
|
||||
inventoryQuantity={meta.inventoryQuantity}
|
||||
sku={meta.sku}
|
||||
buttons={[
|
||||
{ text: "Add To Cart", onClick: handleAddToCart },
|
||||
{ text: "Buy Now", onClick: handleBuyNow },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div id="product-cart" data-section="product-cart">
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
onClose={() => setCartOpen(false)}
|
||||
items={cartItems}
|
||||
onQuantityChange={updateQuantity}
|
||||
onRemove={removeItem}
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ReactLenis>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
{renderContent()}
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
onClose={() => setCartOpen(false)}
|
||||
items={cartItems}
|
||||
onQuantityChange={updateQuantity}
|
||||
onRemove={removeItem}
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,29 @@
|
||||
"use client";
|
||||
|
||||
import React, { useCallback } from "react";
|
||||
import ReactLenis from "lenis/react";
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||
import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple';
|
||||
import FooterMedia from '@/components/sections/footer/FooterMedia';
|
||||
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
|
||||
import ProductCardOne from "@/components/sections/product/ProductCardOne";
|
||||
import ProductCart from "@/components/ecommerce/cart/ProductCart";
|
||||
import { useProductCatalog } from "@/hooks/useProductCatalog";
|
||||
import { useCart } from "@/hooks/useCart";
|
||||
import { useCheckout } from "@/hooks/useCheckout";
|
||||
|
||||
const navItems = [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Products", id: "/shop" },
|
||||
{ name: "About", id: "/#about" },
|
||||
{ name: "Testimonials", id: "/#testimonials" },
|
||||
{ name: "Contact", id: "/#contact" },
|
||||
];
|
||||
|
||||
export default function ShopPage() {
|
||||
const router = useRouter();
|
||||
const {
|
||||
products,
|
||||
isLoading,
|
||||
search,
|
||||
setSearch,
|
||||
filters,
|
||||
} = useProductCatalog({ basePath: "/shop" });
|
||||
|
||||
const {
|
||||
@@ -41,22 +47,17 @@ export default function ShopPage() {
|
||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||
}, [cartItems, checkout, getCheckoutItems]);
|
||||
|
||||
const cartCount = cartItems.length;
|
||||
const navbarProps = {
|
||||
brandName: "Persik", navItems: [
|
||||
{ name: "Home", id: "/" },
|
||||
{ name: "Shop", id: "/shop" },
|
||||
{ name: "About", id: "#about" },
|
||||
{ name: "Testimonials", id: "#testimonials" },
|
||||
{ name: "Contact", id: "#contact" }
|
||||
],
|
||||
button: { text: "Cart", onClick: () => setCartOpen(true) },
|
||||
brandName: "Persik", navItems: navItems,
|
||||
button: { text: `Cart (${cartCount})`, onClick: () => setCartOpen(true) },
|
||||
mobileNavContent: (
|
||||
<div className="flex flex-col gap-2 mt-4">
|
||||
<button
|
||||
onClick={() => setCartOpen(true)}
|
||||
className="w-full text-left p-2 rounded-md hover:bg-muted/50"
|
||||
>
|
||||
Cart
|
||||
Cart ({cartCount})
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
@@ -65,40 +66,11 @@ export default function ShopPage() {
|
||||
const footerProps = {
|
||||
imageSrc: "https://img.b2bpic.net/free-photo/woman-holds-festive-flower-arrangement-with-bright-chrysanthemum-flowers_169016-51483.jpg?_wi=3", imageAlt: "Soft focus background image of various flowers", logoText: "Persik Flowers", copyrightText: "© 2024 Persik | All rights reserved", columns: [
|
||||
{ title: "Shop", items: [{ label: "Bouquets", href: "/shop" }, { label: "Arrangements", href: "/shop" }, { label: "Gifts", href: "/shop" }] },
|
||||
{ title: "About Us", items: [{ label: "Our Story", href: "#about" }, { label: "Testimonials", href: "#testimonials" }] },
|
||||
{ title: "Support", items: [{ label: "Contact", href: "#contact" }, { label: "Delivery Info", href: "https://example.com/delivery" }, { label: "Privacy Policy", href: "https://example.com/privacy" }] }
|
||||
{ title: "About Us", items: [{ label: "Our Story", href: "/#about" }, { label: "Testimonials", href: "/#testimonials" }] },
|
||||
{ title: "Support", items: [{ label: "Contact", href: "/#contact" }, { label: "Delivery Info", href: "https://example.com/delivery" }, { label: "Privacy Policy", href: "https://example.com/privacy" }] }
|
||||
]
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="elastic-effect"
|
||||
defaultTextAnimation="reveal-blur"
|
||||
borderRadius="soft"
|
||||
contentWidth="smallMedium"
|
||||
sizing="mediumSizeLargeTitles"
|
||||
background="none"
|
||||
cardStyle="gradient-bordered"
|
||||
primaryButtonStyle="diagonal-gradient"
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<p className="text-foreground">Loading products...</p>
|
||||
</main>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ReactLenis>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="elastic-effect"
|
||||
@@ -112,40 +84,49 @@ export default function ShopPage() {
|
||||
secondaryButtonStyle="solid"
|
||||
headingFontWeight="light"
|
||||
>
|
||||
<ReactLenis root>
|
||||
<div id="navbar" data-section="navbar">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
<div id="nav" data-section="nav">
|
||||
<NavbarStyleApple {...navbarProps} />
|
||||
</div>
|
||||
{isLoading ? (
|
||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||
<p className="text-foreground">Loading products...</p>
|
||||
</main>
|
||||
) : (
|
||||
<div id="product-catalog" data-section="product-catalog">
|
||||
<ProductCatalog
|
||||
layout="page"
|
||||
products={products}
|
||||
searchValue={search}
|
||||
onSearchChange={setSearch}
|
||||
searchPlaceholder="Search products..."
|
||||
filters={filters}
|
||||
emptyMessage="No products found"
|
||||
<ProductCardOne
|
||||
title="Our Products"
|
||||
description="Browse our collection of beautiful flowers."
|
||||
products={products.map((p: any) => ({
|
||||
id: p.id,
|
||||
name: p.name,
|
||||
price: p.price,
|
||||
imageSrc: p.images?.[0]?.src || '/placeholders/placeholder1.webp',
|
||||
imageAlt: p.images?.[0]?.alt || p.name,
|
||||
onProductClick: () => router.push(`/shop/${p.id}`),
|
||||
}))}
|
||||
gridVariant="four-items-2x2-equal-grid"
|
||||
animationType="slide-up"
|
||||
textboxLayout="default"
|
||||
useInvertedBackground={false}
|
||||
/>
|
||||
</div>
|
||||
<div id="product-cart" data-section="product-cart">
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
onClose={() => setCartOpen(false)}
|
||||
items={cartItems}
|
||||
onQuantityChange={updateQuantity}
|
||||
onRemove={removeItem}
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ReactLenis>
|
||||
)}
|
||||
<ProductCart
|
||||
isOpen={cartOpen}
|
||||
onClose={() => setCartOpen(false)}
|
||||
items={cartItems}
|
||||
onQuantityChange={updateQuantity}
|
||||
onRemove={removeItem}
|
||||
total={`$${cartTotal}`}
|
||||
buttons={[
|
||||
{
|
||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterMedia {...footerProps} />
|
||||
</div>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user