mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 23:16:59 +00:00
Fix some broken types
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
parent
999dae22d5
commit
f5f8d7bd8b
@ -1,10 +1,4 @@
|
|||||||
{
|
{
|
||||||
"provider": "opencommerce",
|
"provider": "opencommerce",
|
||||||
"features": {
|
"features": {}
|
||||||
"wishlist": false,
|
|
||||||
"cart": false,
|
|
||||||
"search": false,
|
|
||||||
"customerAuth": false,
|
|
||||||
"customCheckout": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ export function normalizeProduct(
|
|||||||
images: media?.length
|
images: media?.length
|
||||||
? normalizeProductImages(<ImageInfo[]>media, title ?? '')
|
? normalizeProductImages(<ImageInfo[]>media, title ?? '')
|
||||||
: [],
|
: [],
|
||||||
vendor: product.vendor ?? undefined,
|
...(product.vendor ? { vendor: product.vendor } : {}),
|
||||||
price: {
|
price: {
|
||||||
value: pricing[0]?.minPrice ?? 0,
|
value: pricing[0]?.minPrice ?? 0,
|
||||||
currencyCode: pricing[0]?.currency.code,
|
currencyCode: pricing[0]?.currency.code,
|
||||||
@ -175,7 +175,9 @@ const normalizeProductOption = (variant: CatalogProductVariant) => {
|
|||||||
__typename: 'MultipleChoiceOption',
|
__typename: 'MultipleChoiceOption',
|
||||||
id: variant._id,
|
id: variant._id,
|
||||||
displayName: variant.attributeLabel,
|
displayName: variant.attributeLabel,
|
||||||
values: variant.optionTitle ? [{ label: variant.optionTitle }] : [],
|
values: variant.optionTitle
|
||||||
|
? [{ label: variant.optionTitle }]
|
||||||
|
: [{ label: '' }],
|
||||||
}
|
}
|
||||||
option.values = option.values.map((value) =>
|
option.values = option.values.map((value) =>
|
||||||
colorizeProductOptionValue(value, option.displayName)
|
colorizeProductOptionValue(value, option.displayName)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user