4
0
forked from crowetic/commerce

Removes unnecessary async on ProductGridItems (#977)

This commit is contained in:
Michael Novotny 2023-04-20 13:54:04 -05:00 committed by GitHub
parent acb4ff400b
commit 7de3ae5583
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 4 deletions

View File

@ -105,7 +105,6 @@ async function RelatedProducts({ id }: { id: string }) {
<div className="px-4 py-8">
<div className="mb-4 text-3xl font-bold">Related Products</div>
<Grid className="grid-cols-2 lg:grid-cols-5">
{/* @ts-expect-error Server Component */}
<ProductGridItems products={relatedProducts} />
</Grid>
</div>

View File

@ -41,7 +41,6 @@ export default async function CategoryPage({ params }: { params: { collection: s
<p className="py-3 text-lg">{`No products found in this collection`}</p>
) : (
<Grid className="grid-cols-2 lg:grid-cols-3">
{/* @ts-expect-error Server Component */}
<ProductGridItems products={products} />
</Grid>
)}

View File

@ -33,7 +33,6 @@ export default async function SearchPage({
) : null}
{products.length > 0 ? (
<Grid className="grid-cols-2 lg:grid-cols-3">
{/* @ts-expect-error Server Component */}
<ProductGridItems products={products} />
</Grid>
) : null}

View File

@ -3,7 +3,7 @@ import { GridTileImage } from 'components/grid/tile';
import { Product } from 'lib/shopify/types';
import Link from 'next/link';
export default async function ProductGridItems({ products }: { products: Product[] }) {
export default function ProductGridItems({ products }: { products: Product[] }) {
return (
<>
{products.map((product) => (