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="px-4 py-8">
<div className="mb-4 text-3xl font-bold">Related Products</div> <div className="mb-4 text-3xl font-bold">Related Products</div>
<Grid className="grid-cols-2 lg:grid-cols-5"> <Grid className="grid-cols-2 lg:grid-cols-5">
{/* @ts-expect-error Server Component */}
<ProductGridItems products={relatedProducts} /> <ProductGridItems products={relatedProducts} />
</Grid> </Grid>
</div> </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> <p className="py-3 text-lg">{`No products found in this collection`}</p>
) : ( ) : (
<Grid className="grid-cols-2 lg:grid-cols-3"> <Grid className="grid-cols-2 lg:grid-cols-3">
{/* @ts-expect-error Server Component */}
<ProductGridItems products={products} /> <ProductGridItems products={products} />
</Grid> </Grid>
)} )}

View File

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

View File

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