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" + } + ]} />