import { GridTileImage } from "components/grid/tile"; import { getCollectionProducts } from "lib/store/products"; import type { Product } from "lib/store/types"; import { getImageUrl } from "lib/utils/image"; 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 homepageItems = await getCollectionProducts({ collection: "hidden-homepage-featured-items", }); if (!homepageItems[0] || !homepageItems[1] || !homepageItems[2]) return null; const [firstProduct, secondProduct, thirdProduct] = homepageItems; return (
); }