mirror of
https://github.com/vercel/commerce.git
synced 2025-06-19 05:31:22 +00:00
Optimize preview image size
This commit is contained in:
parent
d4e8105ce0
commit
16d288cfe8
@ -75,7 +75,7 @@ export function normalizeSearchResult(item: SearchResultFragment): Product {
|
||||
description: item.description,
|
||||
slug: item.slug,
|
||||
path: item.slug,
|
||||
images: [{ url: item.productAsset?.preview || '' }],
|
||||
images: [{ url: item.productAsset?.preview + '?preset=medium' || '' }],
|
||||
variants: [],
|
||||
price: {
|
||||
value: (item.priceWithTax as any).min / 100,
|
||||
@ -100,7 +100,7 @@ export function normalizeCart(order: CartFragment): Cart {
|
||||
url: l.productVariant.product.slug,
|
||||
variantId: l.productVariant.id,
|
||||
productId: l.productVariant.productId,
|
||||
images: [{ url: l.featuredAsset?.preview || '' }],
|
||||
images: [{ url: l.featuredAsset?.preview + '?preset=thumb' || '' }],
|
||||
prices: [],
|
||||
})),
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ async function getProduct({
|
||||
},
|
||||
options: product.optionGroups.map((og: any) => ({
|
||||
displayName: og.name,
|
||||
values: og.options.map((o: any) => ({ label: o.name + ' hello' })),
|
||||
values: og.options.map((o: any) => ({ label: o.name })),
|
||||
})),
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user