willba-component-library 0.1.26 → 0.1.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "A stroybook 6 with TypeScript demo",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -64,7 +64,7 @@ export default function FilterBar({
64
64
 
65
65
  const targetFilterBarRef = useRef<HTMLDivElement | null>(null)
66
66
  useEffect(() => {
67
- if (window !== undefined && window.innerWidth < 960) return
67
+ if (window !== undefined && window.innerWidth > 960) return
68
68
  if (targetFilterBarRef.current && selectedFilter) {
69
69
  window.scrollTo({
70
70
  behavior: 'smooth',
@@ -62,9 +62,13 @@ export default function useFilterBar({ redirectUrl }: UseFilterBarPropsType) {
62
62
  : '',
63
63
  endDate: calendarRange?.to ? format(calendarRange.to, 'yyyy-MM-dd') : '',
64
64
  categories,
65
- ageCategoryCounts: JSON.stringify(ageCategoryCounts),
65
+ ageCategoryCounts: Object.entries(ageCategoryCounts).length
66
+ ? JSON.stringify(ageCategoryCounts)
67
+ : '',
66
68
  }
67
69
 
70
+ console.log(params)
71
+
68
72
  for (const [key, value] of Object.entries(params)) {
69
73
  if (value) {
70
74
  queryParams.append(key, value.toString())