@digital-b2c/coreui-kit 0.11.16 → 0.11.18

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/index.cjs CHANGED
@@ -3301,7 +3301,8 @@ var ResourcesGridList = ({
3301
3301
  setCurrentPage(1);
3302
3302
  const categoryText = (_b = (_a2 = categories[index]) == null ? void 0 : _a2.label) == null ? void 0 : _b.replaceAll(" ", "-");
3303
3303
  if (typeof window !== "undefined" && categoryText) {
3304
- const url = `${window.location.pathname}#${categoryText}`;
3304
+ const base_url = window.location.pathname.endsWith("/") ? window.location.pathname.slice(0, -1) : window.location.pathname;
3305
+ const url = `${base_url}#${categoryText}`;
3305
3306
  window.history.replaceState(null, "", url);
3306
3307
  window.dispatchEvent(new HashChangeEvent("hashchange"));
3307
3308
  }
@@ -3312,6 +3313,7 @@ var ResourcesGridList = ({
3312
3313
  setCurrentPage(1);
3313
3314
  };
3314
3315
  const handleSortChange = (value) => {
3316
+ if (value === sortValue) return;
3315
3317
  setSortValue(value);
3316
3318
  setCurrentPage(1);
3317
3319
  };