@propeller-commerce/propeller-v2-react-ui 0.8.0 → 0.9.0

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.
package/dist/pure.cjs CHANGED
@@ -40,8 +40,8 @@ function Breadcrumbs(props) {
40
40
  }
41
41
  const displayItems = props.showCurrent === false && items.length > 0 ? items.slice(0, items.length - 1) : items;
42
42
  function getCategoryName(cat) {
43
- const match = cat.name?.find((n) => n.language === lang);
44
- return match?.value || cat.name?.[0]?.value || "";
43
+ const match = cat.names?.find((n) => n.language === lang);
44
+ return match?.value || cat.names?.[0]?.value || "";
45
45
  }
46
46
  function getCategoryUrl(cat, index) {
47
47
  if (props.getUrl) return props.getUrl(cat, index);
@@ -49,7 +49,7 @@ function Breadcrumbs(props) {
49
49
  if (urls && typeof urls.getCategoryUrl === "function") {
50
50
  return urls.getCategoryUrl(cat, props.language);
51
51
  }
52
- const slug = cat.slug?.find((s) => s.language === lang)?.value || cat.slug?.[0]?.value || "";
52
+ const slug = cat.slugs?.find((s) => s.language === lang)?.value || cat.slugs?.[0]?.value || "";
53
53
  return `/category/${cat.categoryId}/${slug}`;
54
54
  }
55
55
  function isCurrentItem(index) {
@@ -160,7 +160,7 @@ function ProductJsonLd(props) {
160
160
  }
161
161
  var ProductJsonLd_default = React__namespace.memo(ProductJsonLd);
162
162
  function CategoryShortDescription(props) {
163
- const match = props.category?.shortDescription?.find(
163
+ const match = props.category?.shortDescriptions?.find(
164
164
  (d) => d.language === props.language
165
165
  );
166
166
  const html = match?.value || "";