From c715903b306164a43cbb30c624f181765131e3bc Mon Sep 17 00:00:00 2001 From: bender Date: Sat, 21 Feb 2026 14:15:55 +0000 Subject: [PATCH 1/5] Update src/app/blog/page.tsx --- src/app/blog/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/blog/page.tsx b/src/app/blog/page.tsx index a1d479b..d3ed726 100644 --- a/src/app/blog/page.tsx +++ b/src/app/blog/page.tsx @@ -33,7 +33,7 @@ export default function BlogPage() {
- Date: Sat, 21 Feb 2026 14:15:58 +0000 Subject: [PATCH 4/5] Update src/app/shop/[id]/page.tsx --- src/app/shop/[id]/page.tsx | 364 ++++++++++--------------------------- 1 file changed, 92 insertions(+), 272 deletions(-) diff --git a/src/app/shop/[id]/page.tsx b/src/app/shop/[id]/page.tsx index 3537f43..3261133 100644 --- a/src/app/shop/[id]/page.tsx +++ b/src/app/shop/[id]/page.tsx @@ -3,277 +3,97 @@ import { use, useCallback } from "react"; import { useRouter } from "next/navigation"; import ReactLenis from "lenis/react"; -import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; -import NavbarLayoutFloatingInline from "@/components/navbar/NavbarLayoutFloatingInline"; -import ProductDetailCard from "@/components/ecommerce/productDetail/ProductDetailCard"; -import ProductCart from "@/components/ecommerce/cart/ProductCart"; -import { useProductDetail } from "@/hooks/useProductDetail"; -import { useCart } from "@/hooks/useCart"; -import { useCheckout } from "@/hooks/useCheckout"; -import FooterBaseCard from '@/components/sections/footer/FooterBaseCard'; +import { ThemeProvider } => { + const navigationItems = [ + { name: "Features", id: "/#features" }, + { name: "Products", id: "/#products" }, + { name: "Testimonials", id: "/#testimonials" }, + { name: "FAQ", id: "/#faq" }, + { name: "Contact", id: "/#contact" } + ]; -interface ProductPageProps { - params: Promise<{ id: string }>; -} - -export default function ProductPage({ params }: ProductPageProps) { - const { id } = use(params); - const router = useRouter(); - - const { - product, - isLoading, - images, - meta, - variants, - quantityVariant, - selectedQuantity, - createCartItem, - } = useProductDetail(id); - - const { - items: cartItems, - isOpen: cartOpen, - setIsOpen: setCartOpen, - addItem, - updateQuantity, - removeItem, - total: cartTotal, - getCheckoutItems, - } = useCart(); - - const { buyNow, checkout, isLoading: isCheckoutLoading } = useCheckout(); - - const handleAddToCart = useCallback(() => { - const item = createCartItem(); - if (item) { - addItem(item); - } - }, [createCartItem, addItem]); - - const handleBuyNow = useCallback(() => { - if (product) { - buyNow(product, selectedQuantity); - } - }, [product, selectedQuantity, buyNow]); - - 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 product...

-
-
- -
-
- ); - } - - if (!product) { - return ( - - - -
-
-
-

Product not found

- -
-
-
- -
-
- ); - } - - return ( - - - -
- 0 ? variants : undefined} - quantity={quantityVariant} - ribbon={meta.ribbon} - inventoryStatus={meta.inventoryStatus} - inventoryQuantity={meta.inventoryQuantity} - sku={meta.sku} - buttons={[ - { text: "Add To Cart", onClick: handleAddToCart }, - { text: "Buy Now", onClick: handleBuyNow }, - ]} - /> -
-
- setCartOpen(false)} - items={cartItems} - onQuantityChange={updateQuantity} - onRemove={removeItem} - total={`$${cartTotal}`} - buttons={[ - { - text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout, - }, - ]} - /> -
- -
-
- ); + return ( + + + +
+ 0 ? variants : undefined} + quantity={quantityVariant} + ribbon={meta.ribbon} + inventoryStatus={meta.inventoryStatus} + inventoryQuantity={meta.inventoryQuantity} + sku={meta.sku} + buttons={[ + { text: "Add To Cart", onClick: handleAddToCart }, + { text: "Buy Now", onClick: handleBuyNow }, + ]} + /> +
+
+ setCartOpen(false)} + items={cartItems} + onQuantityChange={updateQuantity} + onRemove={removeItem} + total={`$${cartTotal}`} + buttons={[ + { + text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout, + }, + ]} + /> +
+ +
+
+ ); } -- 2.49.1 From e6e5c1ed62aff6e97fc457ca6645040123f2cb31 Mon Sep 17 00:00:00 2001 From: bender Date: Sat, 21 Feb 2026 14:15:58 +0000 Subject: [PATCH 5/5] Update src/app/shop/page.tsx --- src/app/shop/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shop/page.tsx b/src/app/shop/page.tsx index a6649d8..1307413 100644 --- a/src/app/shop/page.tsx +++ b/src/app/shop/page.tsx @@ -34,7 +34,7 @@ export default function ShopPage() {