From b35145a1df5f2995294f829e0b7cde20ba0e0f29 Mon Sep 17 00:00:00 2001 From: Paul H Choi Date: Wed, 3 Apr 2024 19:55:02 -0400 Subject: [PATCH] feat(457): add filter count to button --- src/components/SidePanelControlBar.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/SidePanelControlBar.tsx b/src/components/SidePanelControlBar.tsx index 2aed1a8c..686e0564 100644 --- a/src/components/SidePanelControlBar.tsx +++ b/src/components/SidePanelControlBar.tsx @@ -10,7 +10,11 @@ import { SquaresFour, Table, } from "@phosphor-icons/react"; +<<<<<<< HEAD import { ThemeButton } from "./ThemeButton"; +======= +import { useFilter } from "@/context/FilterContext"; +>>>>>>> f1c5e16 (feat(457): add filter count to button) type SidePanelControlBarProps = { currentView: string; @@ -29,7 +33,12 @@ const SearchBarComponent: FC = ({ updateCurrentView, updateSmallScreenMode, }) => { +<<<<<<< HEAD const filterRef = useRef(null); +======= + const { appFilter } = useFilter(); + const filterCount = Object.keys(appFilter).length; +>>>>>>> f1c5e16 (feat(457): add filter count to button) return loading ? (
{/* Keep empty while loading */}