Skip to content

Instantly share code, notes, and snippets.

@stefanoverna
Created June 8, 2018 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanoverna/e48f843b0fd08eb42e229812398aee35 to your computer and use it in GitHub Desktop.
Save stefanoverna/e48f843b0fd08eb42e229812398aee35 to your computer and use it in GitHub Desktop.
const IndexPage = ({ data }) => (
<div className="Catalogue">
{
data.products.edges.map(({ node: product }) => (
<div className="Catalogue__item" key={product.id}>
<a
href="#"
className="Product snipcart-add-item"
data-item-id={product.slug}
data-item-price={product.price}
data-item-image={product.image}
data-item-name={product.name}
data-item-url={`/`}
>
{ /* ... */ }
</a>
</div>
))
}
</div>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment