Update src/app/shop/[id]/page.tsx

This commit is contained in:
2026-02-23 15:18:21 +00:00
parent a8031dc26f
commit 581e728501

View File

@@ -1,10 +1,10 @@
use client";
"use client";
import { Suspense, use, useCallback } from "react";
import { useRouter } from "next/navigation";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline";
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
import FooterSimple from '@/components/sections/footer/FooterSimple';
import ProductDetailCard from "@/components/ecommerce/productDetail/ProductDetailCard";
import ProductCart from "@/components/ecommerce/cart/ProductCart";
@@ -75,15 +75,16 @@ function ProductPageContent({ params }: ProductPageProps) {
}, [cartItems, checkout, getCheckoutItems]);
const navbarProps = {
navItems: [{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }],
navItems: [{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }, { name: "Blog", id: "/blog" }],
brandName: "Balala", className: "py-4 px-6", navItemClassName: "text-foreground hover:text-primary-cta", buttonClassName: "bg-primary-cta text-primary-cta-text", buttonTextClassName: "font-semibold"
};
const footerProps = {
columns: [
{ title: "Shop", items: [{ label: "Bouquets", href: "products" }, { label: "Seasonal", href: "products" }, { label: "Custom Orders", href: "contact" }] },
{ title: "Studio", items: [{ label: "About Us", href: "about" }, { label: "FAQ", href: "faq" }, { label: "Contact", href: "contact" }] },
{ title: "Legal", items: [{ label: "Privacy Policy", href: "privacy" }, { label: "Terms of Service", href: "terms" }] }
{ title: "Shop", items: [{ label: "Bouquets", href: "/#products" }, { label: "Seasonal", href: "/#products" }, { label: "Our Shop", href: "/shop" }] },
{ title: "Studio", items: [{ label: "About Us", href: "/#about" }, { label: "FAQ", href: "/#faq" }, { label: "Contact", href: "/#contact" }] },
{ title: "Resources", items: [{ label: "Blog", href: "/blog" }] },
{ title: "Legal", items: [{ label: "Privacy Policy", href: "#" }, { label: "Terms of Service", href: "#" }] },
],
bottomLeftText: "© 2024 Balala Flowers Studio. All rights reserved.", bottomRightText: "Crafted with passion by Balala", columnTitleClassName: "text-foreground", columnItemClassName: "text-foreground hover:text-primary-cta", bottomLeftTextClassName: "text-foreground", bottomRightTextClassName: "text-foreground", dividerClassName: "bg-accent"
};
@@ -104,10 +105,10 @@ function ProductPageContent({ params }: ProductPageProps) {
headingFontWeight="bold"
>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<div id="nav" data-section="nav">
<NavbarLayoutFloatingInline
{...navbarProps}
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
button={{ text: `Cart (${cartItems.length})`, onClick: () => setCartOpen(true) }}
/>
</div>
<main className="min-h-screen flex items-center justify-center pt-20">
@@ -136,10 +137,10 @@ function ProductPageContent({ params }: ProductPageProps) {
headingFontWeight="bold"
>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<div id="nav" data-section="nav">
<NavbarLayoutFloatingInline
{...navbarProps}
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
button={{ text: `Cart (${cartItems.length})`, onClick: () => setCartOpen(true) }}
/>
</div>
<main className="min-h-screen flex items-center justify-center pt-20">
@@ -175,10 +176,10 @@ function ProductPageContent({ params }: ProductPageProps) {
headingFontWeight="bold"
>
<ReactLenis root>
<div id="navbar" data-section="navbar">
<div id="nav" data-section="nav">
<NavbarLayoutFloatingInline
{...navbarProps}
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
button={{ text: `Cart (${cartItems.length})`, onClick: () => setCartOpen(true) }}
/>
</div>
<div id="product-detail-card" data-section="product-detail-card">