134 lines
5.6 KiB
TypeScript
134 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 FooterMedia from '@/components/sections/footer/FooterMedia';
|
|
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="text-stagger"
|
|
defaultTextAnimation="entrance-slide"
|
|
borderRadius="rounded"
|
|
contentWidth="small"
|
|
sizing="largeSmall"
|
|
background="none"
|
|
cardStyle="subtle-shadow"
|
|
primaryButtonStyle="flat"
|
|
secondaryButtonStyle="glass"
|
|
headingFontWeight="light"
|
|
>
|
|
<ReactLenis root>
|
|
<div id="nav" data-section="nav">
|
|
<NavbarStyleFullscreen
|
|
navItems={[
|
|
{ name: "Home", id: "/" },
|
|
{ name: "About", id: "/#about" },
|
|
{ name: "Pricing", id: "/#pricing" },
|
|
{ name: "Shop", id: "/shop" },
|
|
{ name: "Team", id: "/#team" },
|
|
{ name: "Testimonials", id: "/#testimonials" },
|
|
{ name: "Contact", id: "/#contact" }
|
|
]}
|
|
brandName="Angola"
|
|
bottomLeftText="Experience the Beauty"
|
|
bottomRightText="hello@angola.com"
|
|
button={{ text: "Cart", onClick: () => {} }}
|
|
/>
|
|
</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>
|
|
</ReactLenis>
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<ThemeProvider
|
|
defaultButtonVariant="text-stagger"
|
|
defaultTextAnimation="entrance-slide"
|
|
borderRadius="rounded"
|
|
contentWidth="small"
|
|
sizing="largeSmall"
|
|
background="none"
|
|
cardStyle="subtle-shadow"
|
|
primaryButtonStyle="flat"
|
|
secondaryButtonStyle="glass"
|
|
headingFontWeight="light"
|
|
>
|
|
<ReactLenis root>
|
|
<div id="nav" data-section="nav">
|
|
<NavbarStyleFullscreen
|
|
navItems={[
|
|
{ name: "Home", id: "/" },
|
|
{ name: "About", id: "/#about" },
|
|
{ name: "Pricing", id: "/#pricing" },
|
|
{ name: "Shop", id: "/shop" },
|
|
{ name: "Team", id: "/#team" },
|
|
{ name: "Testimonials", id: "/#testimonials" },
|
|
{ name: "Contact", id: "/#contact" }
|
|
]}
|
|
brandName="Angola"
|
|
bottomLeftText="Experience the Beauty"
|
|
bottomRightText="hello@angola.com"
|
|
button={{ text: "Cart", onClick: () => {} }}
|
|
/>
|
|
</div>
|
|
<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="footer" data-section="footer">
|
|
<FooterMedia
|
|
imageSrc="http://img.b2bpic.net/free-photo/beautiful-decoration-cute-little-dried-colorful-flowers-wallpaper_343596-3238.jpg?_wi=3"
|
|
imageAlt="Soft, blurred pastel flowers in a tranquil setting"
|
|
columns={[
|
|
{ title: "Shop", items: [{ label: "Bouquets", href: "/shop" }, { label: "Arrangements", href: "/shop" }, { label: "Custom Orders", href: "/#contact" }] },
|
|
{ title: "Company", items: [
|
|
{ label: "About Us", href: "/#about" },
|
|
{ label: "Contact", href: "/#contact" }
|
|
] },
|
|
{ title: "Connect", items: [{ label: "Instagram", href: "https://instagram.com/angola_flowers" }, { label: "Facebook", href: "https://facebook.com/angola_flowers" }] }
|
|
]}
|
|
logoText="Angola"
|
|
copyrightText="© 2024 Angola Flowers Studio. All rights reserved."
|
|
/>
|
|
</div>
|
|
</main>
|
|
</ReactLenis>
|
|
</ThemeProvider>
|
|
);
|
|
}
|
|
|
|
export default function ShopPage() {
|
|
return (
|
|
<Suspense>
|
|
<ShopPageContent />
|
|
</Suspense>
|
|
);
|
|
}
|