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() });
|
||||
}, [cartItems, checkout, getCheckoutItems]);
|
||||
|
||||
if (isLoading) {
|
||||
if (isLoading || !product) {
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="bounce-effect"
|
||||
@@ -145,8 +145,19 @@ export default function ProductPage({ params }: ProductPageProps) {
|
||||
</div>
|
||||
<div id="productDetail" data-section="productDetail">
|
||||
<ProductDetailCard
|
||||
layout="page"
|
||||
name={product.name}
|
||||
price={`$${product.price}`}
|
||||
images={images}
|
||||
variants={variants}
|
||||
buttons={[
|
||||
{
|
||||
text: "Add to Cart", onClick: handleAddToCart
|
||||
},
|
||||
{
|
||||
text: "Buy Now", onClick: handleBuyNow
|
||||
}
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
<ProductCart
|
||||
|
||||
Reference in New Issue
Block a user