From 6f57069c126160c1ee0919434355d299c43ca6f4 Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 12 Feb 2026 10:32:24 +0000 Subject: [PATCH] Update src/app/shop/[id]/page.tsx --- src/app/shop/[id]/page.tsx | 175 +++++++++++++++++++------------------ 1 file changed, 88 insertions(+), 87 deletions(-) diff --git a/src/app/shop/[id]/page.tsx b/src/app/shop/[id]/page.tsx index ffb467d..6b9cf81 100644 --- a/src/app/shop/[id]/page.tsx +++ b/src/app/shop/[id]/page.tsx @@ -11,6 +11,7 @@ import ProductCart from "@/components/ecommerce/cart/ProductCart"; import { useProductDetail } from "@/hooks/useProductDetail"; import { useCart } from "@/hooks/useCart"; import { useCheckout } from "@/hooks/useCheckout"; +import Link from 'next/link'; interface ProductPageProps { params: Promise<{ id: string }>; @@ -82,14 +83,14 @@ export default function ProductPage({ params }: ProductPageProps) { >

Loading product...

@@ -155,91 +156,91 @@ export default function ProductPage({ params }: ProductPageProps) { >
- 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 }, - ]} - /> + 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, - }, - ]} - /> + setCartOpen(false)} + items={cartItems} + onQuantityChange={updateQuantity} + onRemove={removeItem} + total={`$${cartTotal}`} + buttons={[ + { + text: isCheckoutLoading ? "Processing..." : "Check Out", onClick: handleCheckout, + }, + ]} + />