mirror of
https://github.com/vercel/commerce.git
synced 2025-05-13 21:27:50 +00:00
Show featured items on homepage even if there are <3
This commit is contained in:
parent
58921729ae
commit
72c8855edc
@ -33,15 +33,15 @@ export async function ThreeItemGrid() {
|
||||
collection: 'hidden-homepage-featured-items'
|
||||
});
|
||||
|
||||
if (!homepageItems[0] || !homepageItems[1] || !homepageItems[2]) return null;
|
||||
// if (!homepageItems[0] || !homepageItems[1] || !homepageItems[2]) return null;
|
||||
|
||||
const [firstProduct, secondProduct, thirdProduct] = homepageItems;
|
||||
|
||||
return (
|
||||
<section className="mx-auto grid max-w-screen-2xl gap-4 px-4 pb-4 lg:grid-cols-6 lg:grid-rows-2">
|
||||
<ThreeItemGridItem size="full" item={firstProduct} />
|
||||
<ThreeItemGridItem size="half" item={secondProduct} />
|
||||
<ThreeItemGridItem size="half" item={thirdProduct} />
|
||||
{firstProduct && <ThreeItemGridItem size="full" item={firstProduct} />}
|
||||
{secondProduct && <ThreeItemGridItem size="half" item={secondProduct} />}
|
||||
{thirdProduct && <ThreeItemGridItem size="half" item={thirdProduct} />}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user