Update src/app/shop/page.tsx

This commit is contained in:
2026-02-23 01:11:13 +00:00
parent 6f21d5e4a6
commit 8cdaa9290c

View File

@@ -1,7 +1,6 @@
"use client";
import { Suspense, useCallback } from "react";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline';
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
@@ -54,82 +53,80 @@ function ShopPageContent() {
secondaryButtonStyle="layered"
headingFontWeight="extrabold"
>
<ReactLenis root>
<div id="nav" data-section="nav">
<NavbarLayoutFloatingInline
navItems={[
{ name: "Home", id: "/" },
{ name: "Shop", id: "/shop" }
]}
brandName="2 Dogs Pub"
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
className="py-4 md:py-6"
navItemClassName="text-lg font-semibold"
buttonClassName="px-6 py-3 text-lg font-bold"
buttonTextClassName="tracking-wide"
/>
</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"
/>
</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 id="nav" data-section="nav">
<NavbarLayoutFloatingInline
navItems={[
{ name: "Home", id: "/" },
{ name: "Shop", id: "/shop" }
]}
brandName="2 Dogs Pub"
button={{ text: "Cart", onClick: () => setCartOpen(true) }}
className="py-4 md:py-6"
navItemClassName="text-lg font-semibold"
buttonClassName="px-6 py-3 text-lg font-bold"
buttonTextClassName="tracking-wide"
/>
</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"
/>
</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
imageSrc="https://img.b2bpic.net/free-photo/stone-walled-restaurant-top-lighting_140725-9731.jpg"
imageAlt="Trendy downtown gastropub interior"
columns={[
{ title: "Location", items: [{ label: "123 Pub Street", href: "#" }] },
{ title: "Hours", items: [
{ label: "Mon-Thu: 4 PM - 10 PM", href: "#" },
{ label: "Fri-Sat: 12 PM - 12 AM", href: "#" },
{ label: "Sun: 12 PM - 9 PM", href: "#" }
]},
{ title: "Social", items: [
{ label: "Instagram", href: "#" },
{ label: "Facebook", href: "#" }
]}
<div id="footer" data-section="footer">
<FooterMedia
imageSrc="https://img.b2bpic.net/free-photo/stone-walled-restaurant-top-lighting_140725-9731.jpg"
imageAlt="Trendy downtown gastropub interior"
columns={[
{ title: "Location", items: [{ label: "123 Pub Street", href: "#" }] },
{ title: "Hours", items: [
{ label: "Mon-Thu: 4 PM - 10 PM", href: "#" },
{ label: "Fri-Sat: 12 PM - 12 AM", href: "#" },
{ label: "Sun: 12 PM - 9 PM", href: "#" }
]},
{ title: "Social", items: [
{ label: "Instagram", href: "#" },
{ label: "Facebook", href: "#" }
]}
logoText="2 Dogs Pub"
copyrightText="© 2024 2 Dogs Pub. All rights reserved."
className="bg-background-accent text-foreground pt-16 md:pt-24"
mediaWrapperClassName="h-64 md:h-96 w-full"
logoTextClassName="text-4xl font-extrabold"
columnTitleClassName="text-xl font-bold mb-4 text-primary-cta"
columnItemClassName="text-lg mb-2"
/>
</div>
</ReactLenis>
]}
logoText="2 Dogs Pub"
copyrightText="© 2024 2 Dogs Pub. All rights reserved."
className="bg-background-accent text-foreground pt-16 md:pt-24"
mediaWrapperClassName="h-64 md:h-96 w-full"
logoTextClassName="text-4xl font-extrabold"
columnTitleClassName="text-xl font-bold mb-4 text-primary-cta"
columnItemClassName="text-lg mb-2"
/>
</div>
</ThemeProvider>
);
}