1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-22 20:26:49 +00:00
Files
.github
.vscode
app
components
cart
collection
grid
icons
layout
product
carousel.tsx
loading-dots.tsx
opengraph-image.tsx
price.tsx
prose.tsx
e2e
fonts
lib
.env.example
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
README.md
license.md
next.config.js
package.json
playwright.config.ts
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
commerce/components/carousel.tsx
2023-07-06 10:42:30 +02:00

42 lines
1.4 KiB
TypeScript

import { getCollectionProducts } from 'lib/shopware';
import Image from 'next/image';
import Link from 'next/link';
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;
return null;
// return (
// <div className="relative w-full overflow-hidden bg-black dark:bg-white">
// <div className="flex animate-carousel">
// {[...products, ...products].map((product, i) => (
// <Link
// key={`${product.handle}${i}`}
// href={`/product/${product.handle}`}
// className="relative h-[30vh] w-1/2 flex-none md:w-1/3"
// >
// {product.featuredImage ? (
// <Image
// alt={product.title}
// className="h-full object-contain"
// fill
// sizes="33vw"
// src={product.featuredImage.url}
// />
// ) : null}
// <div className="absolute inset-y-0 right-0 flex items-center justify-center">
// <div className="inline-flex bg-white p-4 text-xl font-semibold text-black dark:bg-black dark:text-white">
// {product.title}
// </div>
// </div>
// </Link>
// ))}
// </div>
// </div>
// );
}