mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Changes
This commit is contained in:
@@ -34,12 +34,10 @@ function productsNormalizer(arr: any[]): Product[] {
|
||||
),
|
||||
variants: variants.edges.map(({ node }: any) => node),
|
||||
productOptions: productOptions.edges.map(({ node }: any) => node),
|
||||
prices: [
|
||||
{
|
||||
value: prices.price.value,
|
||||
currencyCode: prices.price.currencyCode,
|
||||
},
|
||||
],
|
||||
price: {
|
||||
value: prices.price.value,
|
||||
currencyCode: prices.price.currencyCode,
|
||||
},
|
||||
...rest,
|
||||
})
|
||||
)
|
||||
|
7
framework/types.d.ts
vendored
7
framework/types.d.ts
vendored
@@ -6,7 +6,7 @@ interface Product {
|
||||
path?: string
|
||||
images: ProductImage[]
|
||||
variants: ProductVariant[]
|
||||
prices: ProductPrice[]
|
||||
price: ProductPrice
|
||||
}
|
||||
interface ProductImage {
|
||||
url: string
|
||||
@@ -18,9 +18,10 @@ interface ProductVariant {
|
||||
}
|
||||
|
||||
interface ProductPrice {
|
||||
value: number | string
|
||||
value: number
|
||||
currencyCode: 'USD' | 'ARS'
|
||||
type?: 'price' | 'retail' | 'sale' | string
|
||||
retailValue?: number
|
||||
saleValue?: number
|
||||
}
|
||||
|
||||
interface Cart {
|
||||
|
Reference in New Issue
Block a user