Skip to content

Commit

Permalink
πŸ› fix fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
wab committed Sep 8, 2020
1 parent f42bfcd commit 80f3ef6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pages/fetch.js
Expand Up @@ -58,17 +58,17 @@ export default () => (
{products &&
products.map(({ node: product }) => {
const productName = `${
product.category.shortName
} ${product.model && product.model.title} ${product.title}`;
product?.category?.shortName
} ${product?.model?.title} ${product?.title}`;
const price = getPrice(product, 'salePrice');
return (
<Box as="li" key={product.id} mb="1rem">
<button
data-item-id={product.id}
data-item-price={price}
data-item-url={`https://demiselbijoux.com/product/${product.id}`}
data-item-description={product.category.title}
data-item-image={product.thumbnail.asset.fluid.src}
data-item-description={product.category?.title}
data-item-image={product.thumbnail?.asset?.fluid.src}
data-item-name={productName}
data-item-has-taxes-included={true}
>
Expand Down

0 comments on commit 80f3ef6

Please sign in to comment.