willba-component-library 0.1.80 → 0.1.81
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/lib/index.esm.js +8 -8
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -8
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +8 -8
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/hooks/useFilterBar.tsx +10 -9
package/lib/index.umd.js
CHANGED
|
@@ -3988,17 +3988,17 @@
|
|
|
3988
3988
|
};
|
|
3989
3989
|
}, [selectedFilter]);
|
|
3990
3990
|
React__default.useEffect(function () {
|
|
3991
|
-
// Handle default selected tab
|
|
3992
3991
|
if (typeof window === 'undefined')
|
|
3993
3992
|
return;
|
|
3994
3993
|
var defaultTab = (tabs === null || tabs === void 0 ? void 0 : tabs.length) === 1 ? tabs[0] : tabs === null || tabs === void 0 ? void 0 : tabs.find(function (tab) { return tab.default; });
|
|
3995
|
-
var
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
3994
|
+
var findMatchingPath = function () {
|
|
3995
|
+
var paths = [Pages.EVENTS, Pages.ROOMS];
|
|
3996
|
+
return paths.find(function (path) {
|
|
3997
|
+
return window.location.pathname.includes(path) ||
|
|
3998
|
+
(defaultTab && defaultTab.path === path);
|
|
3999
|
+
});
|
|
4000
|
+
};
|
|
4001
|
+
var currentPath = findMatchingPath() || Pages.EVENTS;
|
|
4002
4002
|
setSelectedPath(currentPath);
|
|
4003
4003
|
}, []);
|
|
4004
4004
|
var updateGuestsCount = function (id, newCount) {
|