diff --git a/src/app/shop/page.tsx b/src/app/shop/page.tsx index 599fa4b..9f29ac3 100644 --- a/src/app/shop/page.tsx +++ b/src/app/shop/page.tsx @@ -1,154 +1,88 @@ -use client"; +"use client"; -import { Suspense, useCallback } from "react"; -import ReactLenis from "lenis/react"; import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple'; +import ProductCardOne from '@/components/sections/product/ProductCardOne'; import FooterBase from '@/components/sections/footer/FooterBase'; -import ProductCatalog from "@/components/ecommerce/productCatalog/ProductCatalog"; -import ProductCart from "@/components/ecommerce/cart/ProductCart"; -import { useProductCatalog } from "@/hooks/useProductCatalog"; -import { useCart } from "@/hooks/useCart"; -import { useCheckout } from "@/hooks/useCheckout"; - -function ShopPageContent() { - const { - products, - isLoading, - search, - setSearch, - filters, - } = useProductCatalog({ basePath: "/shop" }); - - const { - items: cartItems, - isOpen: cartOpen, - setIsOpen: setCartOpen, - updateQuantity, - removeItem, - total: cartTotal, - getCheckoutItems, - } = useCart(); - - const { checkout, isLoading: isCheckoutLoading } = useCheckout(); - - const handleCheckout = useCallback(async () => { - if (cartItems.length === 0) return; - - const currentUrl = new URL(window.location.href); - currentUrl.searchParams.set("success", "true"); - - await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() }); - }, [cartItems, checkout, getCheckoutItems]); - - if (isLoading) { - return ( - - - -
-

Loading products...

-
- -
-
- ); - } - - return ( - - - -
- -
-
- setCartOpen(false)} - items={cartItems} - onQuantityChange={updateQuantity} - onRemove={removeItem} - total={`$${cartTotal}`} - buttons={[ - { - text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout, - }, - ]} - /> -
- -
-
- ); -} export default function ShopPage() { - return ( - - - - ); + const navItems = [ + { name: "Home", id: "/" }, + { name: "Products", id: "/products" }, + { name: "About", id: "/about" }, + { name: "Contact", id: "/contact" } + ]; + + const footerColumns = [ + { + title: "Shop", items: [ + { label: "Hookahs", href: "/products" }, + { label: "Tobacco", href: "/products" }, + { label: "Charcoal", href: "/products" }, + { label: "Accessories", href: "/products" }, + ], + }, + { + title: "Company", items: [ + { label: "About Us", href: "/about" }, + { label: "Blog", href: "/blog" }, + { label: "Contact", href: "/contact" }, + ], + }, + { + title: "Legal", items: [ + { label: "Privacy Policy", href: "/privacy" }, + { label: "Terms of Service", href: "/terms" }, + ], + }, + ]; + + return ( + + + +
+ +
+ + +
+ ); }