@local-civics/hub-ui 0.1.179 → 0.1.181
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.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5594,7 +5594,9 @@ const PathwayCard = (props) => {
|
|
|
5594
5594
|
const filteredBadges = activeFilters.size === 0 ? badges : badges.filter(
|
|
5595
5595
|
(b) => {
|
|
5596
5596
|
var _a2;
|
|
5597
|
-
return (_a2 = b.categories) == null ? void 0 : _a2.some(
|
|
5597
|
+
return (_a2 = b.categories) == null ? void 0 : _a2.some(
|
|
5598
|
+
(categoryId) => activeFilters.has(categoryId)
|
|
5599
|
+
);
|
|
5598
5600
|
}
|
|
5599
5601
|
);
|
|
5600
5602
|
const filterClassName = "inline-block px-4 py-2 bg-gray-600 text-white rounded-full cursor-pointer text-sm";
|
|
@@ -5606,10 +5608,10 @@ const PathwayCard = (props) => {
|
|
|
5606
5608
|
return (_a2 = b.categories) == null ? void 0 : _a2.map((c) => activeFilters.has(c));
|
|
5607
5609
|
}
|
|
5608
5610
|
));
|
|
5609
|
-
const toggleFilter = (
|
|
5611
|
+
const toggleFilter = (categoryId) => {
|
|
5610
5612
|
setActiveFilters((prev) => {
|
|
5611
5613
|
const next = new Set(prev);
|
|
5612
|
-
next.has(
|
|
5614
|
+
next.has(categoryId) ? next.delete(categoryId) : next.add(categoryId);
|
|
5613
5615
|
return next;
|
|
5614
5616
|
});
|
|
5615
5617
|
};
|