@sledge-app/react-instant-search 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1713,6 +1713,9 @@ const ProductGrid = ({
1713
1713
  const { product, variants } = item || {};
1714
1714
  const { id, title, image, url, vendor = "", currency } = product || {};
1715
1715
  const { id: variant_id = "", title: variant_title = "", price = "", sku = "" } = (variants == null ? void 0 : variants.length) ? variants[0] : {};
1716
+ const productUrl = new URL(product.url);
1717
+ const arrProductUrlPathname = productUrl.pathname.split("/");
1718
+ const handle = arrProductUrlPathname[arrProductUrlPathname.length - 1];
1716
1719
  let isLoadingAddToCart = clickedAddToCartId == variant_id;
1717
1720
  let isOutOfStock = (variants == null ? void 0 : variants.length) && Object.hasOwn(variants[0], "inventory_quantity") ? !variants[0].inventory_quantity && showOptionOutOfStock : false;
1718
1721
  return cards ? /* @__PURE__ */ jsxRuntimeExports.jsx(React__default.Fragment, { children: cards({
@@ -1720,7 +1723,8 @@ const ProductGrid = ({
1720
1723
  ...{
1721
1724
  ...product,
1722
1725
  ...{
1723
- id: `${SHOPIFY_GID_PRODUCT_ID}${id}`
1726
+ id: `${SHOPIFY_GID_PRODUCT_ID}${id}`,
1727
+ handle
1724
1728
  }
1725
1729
  },
1726
1730
  ...{