mirror of
https://github.com/vercel/commerce.git
synced 2025-05-20 16:36:59 +00:00
fix: use thumbnail as featured image
This commit is contained in:
parent
52a1dddfc6
commit
1a0c2eb85c
@ -180,8 +180,8 @@ const reshapeProduct = (product: MedusaProduct): Product => {
|
|||||||
const tags = product.tags?.map((tag) => tag.value) || [];
|
const tags = product.tags?.map((tag) => tag.value) || [];
|
||||||
const descriptionHtml = product.description ?? '';
|
const descriptionHtml = product.description ?? '';
|
||||||
const featuredImage = {
|
const featuredImage = {
|
||||||
url: product.images?.[0]?.url ?? '',
|
url: product.thumbnail ?? '',
|
||||||
altText: product.images?.[0]?.id ?? ''
|
altText: product.title ?? ''
|
||||||
};
|
};
|
||||||
const availableForSale = product.variants?.[0]?.purchasable || true;
|
const availableForSale = product.variants?.[0]?.purchasable || true;
|
||||||
const variants = product.variants.map((variant) =>
|
const variants = product.variants.map((variant) =>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user