Files
96549f69-3dd6-4d9b-83e9-167…/src/app/shop/page.tsx
2026-02-22 21:47:46 +00:00

126 lines
5.6 KiB
TypeScript

"use client";
import { Suspense } from "react";
import ReactLenis from "lenis/react";
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
import FooterSimple from '@/components/sections/footer/FooterSimple';
import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog";
import { useProductCatalog } from "@/hooks/useProductCatalog";
function ShopPageContent() {
const {
products,
isLoading,
search,
setSearch,
filters,
} = useProductCatalog({ basePath: "/shop" });
if (isLoading) {
return (
<ThemeProvider
defaultButtonVariant="elastic-effect"
defaultTextAnimation="reveal-blur"
borderRadius="rounded"
contentWidth="mediumSmall"
sizing="mediumLarge"
background="noiseDiagonalGradient"
cardStyle="outline"
primaryButtonStyle="inset-glow"
secondaryButtonStyle="layered"
headingFontWeight="semibold"
>
<ReactLenis root>
<div id="nav" data-section="nav">
<NavbarStyleFullscreen
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
brandName="The Grand Hotel"
bottomLeftText="Your Luxurious Escape"
bottomRightText="reservations@grandhotel.com"
topBarClassName="h-20"
/>
</div>
<div id="loading-section" data-section="loading-section">
<main className="min-h-screen flex items-center justify-center pt-20">
<p className="text-foreground">Loading products...</p>
</main>
</div>
<div id="footer" data-section="footer">
<FooterSimple
columns={[
{"title":"Explore","items":[{"label":"Rooms & Suites","href":"/#rooms"},{"label":"Amenities","href":"/#features"},{"label":"Gallery","href":"/#hero"}]},
{"title":"Services","items":[{"label":"Dining","href":"/#hero"},{"label":"Spa","href":"/#features"},{"label":"Events"}]},
{"title":"About","items":[{"label":"Our Story","href":"/#about"},{"label":"Careers"},{"label":"Press"}]},
{"title":"Legal","items":[{"label":"Privacy Policy"},{"label":"Terms of Service"}]}
]}
bottomLeftText="© 2024 The Grand Hotel. All rights reserved."
bottomRightText="Crafted with Distinction"
ariaLabel="Site footer"
/>
</div>
</ReactLenis>
</ThemeProvider>
);
}
return (
<ThemeProvider
defaultButtonVariant="elastic-effect"
defaultTextAnimation="reveal-blur"
borderRadius="rounded"
contentWidth="mediumSmall"
sizing="mediumLarge"
background="noiseDiagonalGradient"
cardStyle="outline"
primaryButtonStyle="inset-glow"
secondaryButtonStyle="layered"
headingFontWeight="semibold"
>
<ReactLenis root>
<div id="nav" data-section="nav">
<NavbarStyleFullscreen
navItems={[{ name: "Home", id: "/" }, { name: "Shop", id: "/shop" }]}
brandName="The Grand Hotel"
bottomLeftText="Your Luxurious Escape"
bottomRightText="reservations@grandhotel.com"
topBarClassName="h-20"
/>
</div>
<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="footer" data-section="footer">
<FooterSimple
columns={[
{"title":"Explore","items":[{"label":"Rooms & Suites","href":"/#rooms"},{"label":"Amenities","href":"/#features"},{"label":"Gallery","href":"/#hero"}]},
{"title":"Services","items":[{"label":"Dining","href":"/#hero"},{"label":"Spa","href":"/#features"},{"label":"Events"}]},
{"title":"About","items":[{"label":"Our Story","href":"/#about"},{"label":"Careers"},{"label":"Press"}]},
{"title":"Legal","items":[{"label":"Privacy Policy"},{"label":"Terms of Service"}]}
]}
bottomLeftText="© 2024 The Grand Hotel. All rights reserved."
bottomRightText="Crafted with Distinction"
ariaLabel="Site footer"
/>
</div>
</ReactLenis>
</ThemeProvider>
);
}
export default function ShopPage() {
return (
<Suspense>
<ShopPageContent />
</Suspense>
);
}