Update src/app/shop/page.tsx
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Suspense, useCallback } from "react";
|
import { Suspense, useCallback } from "react";
|
||||||
import ReactLenis from "lenis/react";
|
|
||||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||||
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
|
import NavbarStyleCentered from '@/components/navbar/NavbarStyleCentered/NavbarStyleCentered';
|
||||||
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
|
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
|
||||||
@@ -68,14 +67,12 @@ function ShopPageContent() {
|
|||||||
secondaryButtonStyle="layered"
|
secondaryButtonStyle="layered"
|
||||||
headingFontWeight="light"
|
headingFontWeight="light"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<div id="nav" data-section="nav">
|
||||||
<div id="navbar" data-section="navbar">
|
{navbar}
|
||||||
{navbar}
|
</div>
|
||||||
</div>
|
<main className="min-h-screen flex items-center justify-center pt-20">
|
||||||
<main className="min-h-screen flex items-center justify-center pt-20">
|
<p className="text-foreground">Loading products...</p>
|
||||||
<p className="text-foreground">Loading products...</p>
|
</main>
|
||||||
</main>
|
|
||||||
</ReactLenis>
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -93,37 +90,35 @@ function ShopPageContent() {
|
|||||||
secondaryButtonStyle="layered"
|
secondaryButtonStyle="layered"
|
||||||
headingFontWeight="light"
|
headingFontWeight="light"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<div id="nav" data-section="nav">
|
||||||
<div id="navbar" data-section="navbar">
|
{navbar}
|
||||||
{navbar}
|
</div>
|
||||||
</div>
|
<div id="product-catalog" data-section="product-catalog">
|
||||||
<div id="product-catalog" data-section="product-catalog">
|
<ProductCatalog
|
||||||
<ProductCatalog
|
layout="page"
|
||||||
layout="page"
|
products={products}
|
||||||
products={products}
|
searchValue={search}
|
||||||
searchValue={search}
|
onSearchChange={setSearch}
|
||||||
onSearchChange={setSearch}
|
searchPlaceholder="Search products..."
|
||||||
searchPlaceholder="Search products..."
|
filters={filters}
|
||||||
filters={filters}
|
emptyMessage="No products found"
|
||||||
emptyMessage="No products found"
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
<div id="product-cart" data-section="product-cart">
|
||||||
<div id="product-cart" data-section="product-cart">
|
<ProductCart
|
||||||
<ProductCart
|
isOpen={cartOpen}
|
||||||
isOpen={cartOpen}
|
onClose={() => setCartOpen(false)}
|
||||||
onClose={() => setCartOpen(false)}
|
items={cartItems}
|
||||||
items={cartItems}
|
onQuantityChange={updateQuantity}
|
||||||
onQuantityChange={updateQuantity}
|
onRemove={removeItem}
|
||||||
onRemove={removeItem}
|
total={`$${cartTotal}`}
|
||||||
total={`$${cartTotal}`}
|
buttons={[
|
||||||
buttons={[
|
{
|
||||||
{
|
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
||||||
text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout,
|
},
|
||||||
},
|
]}
|
||||||
]}
|
/>
|
||||||
/>
|
</div>
|
||||||
</div>
|
|
||||||
</ReactLenis>
|
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user