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}
|
loading={loading}
|
||||||
disabled={variant?.availableForSale === false}
|
disabled={variant?.availableForSale === false}
|
||||||
>
|
>
|
||||||
{variant?.isInStock === false &&
|
{variant?.availableForSale === false
|
||||||
variant?.availableForSale === false
|
? 'Not Available'
|
||||||
? 'Sold Out'
|
|
||||||
: 'Add To Cart'}
|
: 'Add To Cart'}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -62,7 +62,6 @@ const normalizeProductVariants = ({ edges }: ProductVariantConnection) => {
|
|||||||
compareAtPriceV2,
|
compareAtPriceV2,
|
||||||
requiresShipping,
|
requiresShipping,
|
||||||
availableForSale,
|
availableForSale,
|
||||||
quantityAvailable,
|
|
||||||
},
|
},
|
||||||
}) => {
|
}) => {
|
||||||
return {
|
return {
|
||||||
@ -73,7 +72,6 @@ const normalizeProductVariants = ({ edges }: ProductVariantConnection) => {
|
|||||||
listPrice: +compareAtPriceV2?.amount,
|
listPrice: +compareAtPriceV2?.amount,
|
||||||
requiresShipping,
|
requiresShipping,
|
||||||
availableForSale,
|
availableForSale,
|
||||||
isInStock: Number(quantityAvailable) > 0,
|
|
||||||
options: selectedOptions.map(({ name, value }: SelectedOption) => {
|
options: selectedOptions.map(({ name, value }: SelectedOption) => {
|
||||||
const options = normalizeProductOption({
|
const options = normalizeProductOption({
|
||||||
id,
|
id,
|
||||||
|
@ -34,7 +34,6 @@ const getProductQuery = /* GraphQL */ `
|
|||||||
title
|
title
|
||||||
sku
|
sku
|
||||||
availableForSale
|
availableForSale
|
||||||
quantityAvailable
|
|
||||||
requiresShipping
|
requiresShipping
|
||||||
selectedOptions {
|
selectedOptions {
|
||||||
name
|
name
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
"@components/*": ["components/*"],
|
"@components/*": ["components/*"],
|
||||||
"@commerce": ["framework/commerce"],
|
"@commerce": ["framework/commerce"],
|
||||||
"@commerce/*": ["framework/commerce/*"],
|
"@commerce/*": ["framework/commerce/*"],
|
||||||
"@framework": ["framework/vendure"],
|
"@framework": ["framework/bigcommerce"],
|
||||||
"@framework/*": ["framework/vendure/*"]
|
"@framework/*": ["framework/bigcommerce/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
"include": ["next-env.d.ts", "**/*.d.ts", "**/*.ts", "**/*.tsx", "**/*.js"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user