import { getCollectionProducts } from "lib/store/products"; import { getImageUrl } from "lib/utils/image"; import Link from "next/link"; import { GridTileImage } from "./grid/tile"; export async function Carousel() { // Collections that start with `hidden-*` are hidden from the search page. const products = await getCollectionProducts({ collection: "hidden-homepage-carousel", }); if (!products?.length) return null; // Purposefully duplicating products to make the carousel loop and not run out of products on wide screens. const carouselProducts = [...products, ...products, ...products]; return (