From 2d4ba984a744ebc1fadca688082c9f07f1597ced Mon Sep 17 00:00:00 2001 From: bender Date: Sat, 14 Feb 2026 00:38:40 +0000 Subject: [PATCH] Update src/app/shop/[id]/page.tsx --- src/app/shop/[id]/page.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/shop/[id]/page.tsx b/src/app/shop/[id]/page.tsx index e93fb2c..419914e 100644 --- a/src/app/shop/[id]/page.tsx +++ b/src/app/shop/[id]/page.tsx @@ -25,7 +25,6 @@ export default function ProductPage({ params }: ProductPageProps) { isLoading, images, variants, - selectedQuantity, createCartItem, } = useProductDetail(id); @@ -51,9 +50,9 @@ export default function ProductPage({ params }: ProductPageProps) { const handleBuyNow = useCallback(() => { if (product) { - buyNow(product, selectedQuantity); + buyNow(product, 1); } - }, [product, selectedQuantity, buyNow]); + }, [product, buyNow]); const handleCheckout = useCallback(async () => { if (cartItems.length === 0) return; @@ -148,7 +147,6 @@ export default function ProductPage({ params }: ProductPageProps) { router.push('/shop')} @@ -160,6 +158,12 @@ export default function ProductPage({ params }: ProductPageProps) { items={cartItems} onRemove={removeItem} total={cartTotal} + buttons={[ + { + text: "Checkout", onClick: handleCheckout, + variant: "primary" + } + ]} />