mirror of
https://github.com/vercel/commerce.git
synced 2025-05-20 16:36:59 +00:00
Merge pull request #10 from medusajs/fix/thumbnail-as-featured-img
fix: use thumbnail as featured image
This commit is contained in:
commit
99abe4d8da
@ -181,8 +181,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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user