Merge version_1 into main
Merge version_1 into main
This commit was merged in pull request #7.
This commit is contained in:
@@ -63,7 +63,7 @@ export default function ProductPage({ params }: ProductPageProps) {
|
|||||||
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
await checkout(getCheckoutItems(), { successUrl: currentUrl.toString() });
|
||||||
}, [cartItems, checkout, getCheckoutItems]);
|
}, [cartItems, checkout, getCheckoutItems]);
|
||||||
|
|
||||||
if (isLoading) {
|
if (isLoading || !product) {
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="bounce-effect"
|
defaultButtonVariant="bounce-effect"
|
||||||
@@ -145,8 +145,19 @@ export default function ProductPage({ params }: ProductPageProps) {
|
|||||||
</div>
|
</div>
|
||||||
<div id="productDetail" data-section="productDetail">
|
<div id="productDetail" data-section="productDetail">
|
||||||
<ProductDetailCard
|
<ProductDetailCard
|
||||||
|
layout="page"
|
||||||
|
name={product.name}
|
||||||
|
price={`$${product.price}`}
|
||||||
images={images}
|
images={images}
|
||||||
variants={variants}
|
variants={variants}
|
||||||
|
buttons={[
|
||||||
|
{
|
||||||
|
text: "Add to Cart", onClick: handleAddToCart
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: "Buy Now", onClick: handleBuyNow
|
||||||
|
}
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ProductCart
|
<ProductCart
|
||||||
|
|||||||
Reference in New Issue
Block a user