mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 23:46:58 +00:00
sorting out the three item grid, to not be three items anymore 😏
This commit is contained in:
parent
4a7aa19084
commit
85938dcd54
@ -33,15 +33,13 @@ export async function ThreeItemGrid() {
|
||||
collection: 'hidden-homepage-featured-items'
|
||||
});
|
||||
|
||||
// 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-6">
|
||||
{firstProduct && <ThreeItemGridItem size="half" item={firstProduct} />}
|
||||
{secondProduct && <ThreeItemGridItem size="half" item={secondProduct} />}
|
||||
{thirdProduct && <ThreeItemGridItem size="half" item={thirdProduct} />}
|
||||
<>
|
||||
<section className="mx-auto grid max-w-screen-2xl gap-4 px-4 pb-4 lg:grid-cols-6 lg:grid-rows-6 mt-6">
|
||||
{homepageItems.map(item => (
|
||||
<ThreeItemGridItem size="half" item={item} />
|
||||
))}
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user