import { GridTileImage } from 'components/grid/tile'; import { getCollectionProducts } from 'lib/shopware'; import { isSeoUrls } from 'lib/shopware/helpers'; import type { Product } from 'lib/shopware/types'; import Link from 'next/link'; function ThreeItemGridItem({ item, size, priority }: { item: Product; size: 'full' | 'half'; priority?: boolean; }) { return (
); } export async function ThreeItemGrid() { // Collections that start with `hidden-*` are hidden from the search page. const collectionName = isSeoUrls() ? 'Summer-BBQ/Hidden-Category' : '4ab73c06d90d4a5cb312209a64480d87'; const { products: homepageItems } = await getCollectionProducts({ collection: collectionName }); if (!homepageItems[0] || !homepageItems[1] || !homepageItems[2]) return null; const [firstProduct, secondProduct, thirdProduct] = homepageItems; return (
); }