diff --git a/src/components/Dashboard/common/FilterSidebarButton.jsx b/src/components/Dashboard/common/FilterSidebarButton.jsx
index 35cb468f..be10ec02 100644
--- a/src/components/Dashboard/common/FilterSidebarButton.jsx
+++ b/src/components/Dashboard/common/FilterSidebarButton.jsx
@@ -1,23 +1,38 @@
import PropTypes from 'prop-types'
-import { Button } from 'antd'
+import { Badge, Button } from 'antd'
+import { useLocation } from 'react-router-dom'
import FilterCircleFilledIcon from '../../Icons/FilterCircleFilledIcon'
import FilterCircleIcon from '../../Icons/FilterCircleIcon'
+import { useTableState } from '../context/TableStateContext'
-const FilterSidebarButton = ({ active, onClick, ...buttonProps }) => (
-
- ) : (
-
- )
- }
- onClick={onClick}
- type={'default'}
- title={active ? 'Hide filter sidebar' : 'Show filter sidebar'}
- {...buttonProps}
- />
-)
+const FilterSidebarButton = ({ active, onClick, ...buttonProps }) => {
+ const location = useLocation()
+ const { pageFilters } = useTableState()
+ const count = Object.keys(pageFilters[location.pathname] || {}).length
+
+ return (
+
+
+ ) : (
+
+ )
+ }
+ onClick={onClick}
+ type={'default'}
+ title={active ? 'Hide filter sidebar' : 'Show filter sidebar'}
+ {...buttonProps}
+ />
+
+ )
+}
FilterSidebarButton.propTypes = {
active: PropTypes.bool.isRequired,