mirror of
https://github.com/vercel/commerce.git
synced 2025-05-17 15:06: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",
|
||||
"features": {
|
||||
"wishlist": false,
|
||||
"cart": false,
|
||||
"search": false,
|
||||
"customerAuth": false,
|
||||
"customCheckout": false
|
||||
}
|
||||
"features": {}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ export function normalizeProduct(
|
||||
images: media?.length
|
||||
? normalizeProductImages(<ImageInfo[]>media, title ?? '')
|
||||
: [],
|
||||
vendor: product.vendor ?? undefined,
|
||||
...(product.vendor ? { vendor: product.vendor } : {}),
|
||||
price: {
|
||||
value: pricing[0]?.minPrice ?? 0,
|
||||
currencyCode: pricing[0]?.currency.code,
|
||||
@ -175,7 +175,9 @@ const normalizeProductOption = (variant: CatalogProductVariant) => {
|
||||
__typename: 'MultipleChoiceOption',
|
||||
id: variant._id,
|
||||
displayName: variant.attributeLabel,
|
||||
values: variant.optionTitle ? [{ label: variant.optionTitle }] : [],
|
||||
values: variant.optionTitle
|
||||
? [{ label: variant.optionTitle }]
|
||||
: [{ label: '' }],
|
||||
}
|
||||
option.values = option.values.map((value) =>
|
||||
colorizeProductOptionValue(value, option.displayName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user