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.esm.js
CHANGED
|
@@ -3966,17 +3966,17 @@ var useFilterBar = function (_a) {
|
|
|
3966
3966
|
};
|
|
3967
3967
|
}, [selectedFilter]);
|
|
3968
3968
|
useEffect(function () {
|
|
3969
|
-
// Handle default selected tab
|
|
3970
3969
|
if (typeof window === 'undefined')
|
|
3971
3970
|
return;
|
|
3972
3971
|
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; });
|
|
3973
|
-
var
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3972
|
+
var findMatchingPath = function () {
|
|
3973
|
+
var paths = [Pages.EVENTS, Pages.ROOMS];
|
|
3974
|
+
return paths.find(function (path) {
|
|
3975
|
+
return window.location.pathname.includes(path) ||
|
|
3976
|
+
(defaultTab && defaultTab.path === path);
|
|
3977
|
+
});
|
|
3978
|
+
};
|
|
3979
|
+
var currentPath = findMatchingPath() || Pages.EVENTS;
|
|
3980
3980
|
setSelectedPath(currentPath);
|
|
3981
3981
|
}, []);
|
|
3982
3982
|
var updateGuestsCount = function (id, newCount) {
|