mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 11:11:24 +00:00
Fix sold out item
This commit is contained in:
@@ -146,8 +146,12 @@ const ProductView: FC<Props> = ({ product }) => {
|
||||
className={s.button}
|
||||
onClick={addToCart}
|
||||
loading={loading}
|
||||
disabled={variant?.availableForSale === false}
|
||||
>
|
||||
Add to Cart
|
||||
{variant?.isInStock === false &&
|
||||
variant?.availableForSale === false
|
||||
? 'Sold Out'
|
||||
: 'Add To Cart'}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user