mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 05:31:22 +00:00
Fixes
This commit is contained in:
parent
05ee6d2bee
commit
bf80e3b4b9
@ -148,9 +148,8 @@ const ProductView: FC<Props> = ({ product }) => {
|
||||
loading={loading}
|
||||
disabled={variant?.availableForSale === false}
|
||||
>
|
||||
{variant?.isInStock === false &&
|
||||
variant?.availableForSale === false
|
||||
? 'Sold Out'
|
||||
{variant?.availableForSale === false
|
||||
? 'Not Available'
|
||||
: 'Add To Cart'}
|
||||
</Button>
|
||||
</div>
|
||||
|
@ -62,7 +62,6 @@ const normalizeProductVariants = ({ edges }: ProductVariantConnection) => {
|
||||
compareAtPriceV2,
|
||||
requiresShipping,
|
||||
availableForSale,
|
||||
quantityAvailable,
|
||||
},
|
||||
}) => {
|
||||
return {
|
||||
@ -73,7 +72,6 @@ const normalizeProductVariants = ({ edges }: ProductVariantConnection) => {
|
||||
listPrice: +compareAtPriceV2?.amount,
|
||||
requiresShipping,
|
||||
availableForSale,
|
||||
isInStock: Number(quantityAvailable) > 0,
|
||||
options: selectedOptions.map(({ name, value }: SelectedOption) => {
|
||||
const options = normalizeProductOption({
|
||||
id,
|
||||
|
@ -34,7 +34,6 @@ const getProductQuery = /* GraphQL */ `
|
||||
title
|
||||
sku
|
||||
availableForSale
|
||||
quantityAvailable
|
||||
requiresShipping
|
||||
selectedOptions {
|
||||
name
|
||||
|
@ -22,8 +22,8 @@
|
||||
"@components/*": ["components/*"],
|
||||
"@commerce": ["framework/commerce"],
|
||||
"@commerce/*": ["framework/commerce/*"],
|
||||
"@framework": ["framework/vendure"],
|
||||
"@framework/*": ["framework/vendure/*"]
|
||||
"@framework": ["framework/bigcommerce"],
|
||||
"@framework/*": ["framework/bigcommerce/*"]
|
||||
}
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user