Skip to content

Instantly share code, notes, and snippets.

@serifcolakel
Created February 21, 2022 19:56
Show Gist options
  • Save serifcolakel/b1752f86915eb3a3c892831f68263a04 to your computer and use it in GitHub Desktop.
Save serifcolakel/b1752f86915eb3a3c892831f68263a04 to your computer and use it in GitHub Desktop.
import React from 'react'
import { ProductCard } from './ProductCard'
export default function Products({ products }) {
return (
<div className='bg-white'>
<div className='max-w-2xl mx-auto py-16 px-4 sm:py-24 sm:px-6 lg:max-w-7xl lg:px-8'>
<h2 className='text-2xl font-extrabold text-black mb-6'>
Products
</h2>
<div className="grid grid-cols-1 gap-y-10 gap-x-6 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
{products.map(product =>
<ProductCard key={product.node.id} product={product} state={false} />
)}
</div>
</div>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment