Skip to content

Commit

Permalink
user friendly copy
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Rugh <[email protected]>
  • Loading branch information
sirugh committed Oct 15, 2024
1 parent 6647023 commit 6904375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion blocks/product-recommendations/product-recommendations.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ function renderItem(unitId, product) {
}
}

Check failure on line 95 in blocks/product-recommendations/product-recommendations.js

View workflow job for this annotation

GitHub Actions / build

Missing semicolon

const ctaText = product.__typename === 'SimpleProductView' ? 'Add to Cart' : 'Select Options';
const item = document.createRange().createContextualFragment(`<div class="product-grid-item">
<a href="/products/${urlKey}/${product.sku}">
<picture>
Expand All @@ -102,7 +103,7 @@ function renderItem(unitId, product) {
</picture>
<span>${product.name}</span>
</a>
<button>Add to Cart</button>
<button>${ctaText}</button>
</div>`);
item.querySelector('a').addEventListener('click', clickHandler);
item.querySelector('button').addEventListener('click', addToCartHandler);
Expand Down

0 comments on commit 6904375

Please sign in to comment.