Skip to content

Commit bfa66c1

Browse files
committed
refactor: remove clearFilters from AppContent and usePageNavigation
1 parent d9e9e01 commit bfa66c1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/App.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ function AppContent() {
3434
setPeriodKey,
3535
setSearchQuery,
3636
setFilter,
37-
clearFilters,
3837
timeBucket,
3938
periodKey,
4039
searchQuery,
@@ -46,7 +45,6 @@ function AppContent() {
4645
reports,
4746
activeReport,
4847
setActiveReport,
49-
clearFilters,
5048
setGroupByColumn,
5149
groupByColumn,
5250
timeBucket,

src/hooks/usePageNavigation.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ interface PageNavigationDeps {
1313
reports: ParsedReport[];
1414
activeReport: ParsedReport | null;
1515
setActiveReport: (index: number) => void;
16-
clearFilters: () => void;
1716
setGroupByColumn: (column: string) => void;
1817
groupByColumn: string;
1918
timeBucket: string;
@@ -32,7 +31,6 @@ export function usePageNavigation({
3231
reports,
3332
activeReport,
3433
setActiveReport,
35-
clearFilters,
3634
setGroupByColumn,
3735
groupByColumn,
3836
timeBucket,
@@ -49,7 +47,7 @@ export function usePageNavigation({
4947

5048
const setActivePage = useCallback((page: PageType) => {
5149
setActivePageRaw(page);
52-
clearFilters();
50+
// Filters are intentionally sticky across page switches
5351
// Files page has no report types
5452
const reportTypes = PAGE_REPORT_TYPES[page];
5553
if (!reportTypes || reportTypes.length === 0) return;
@@ -60,7 +58,7 @@ export function usePageNavigation({
6058
if (matchIndex !== -1) {
6159
setActiveReport(matchIndex);
6260
}
63-
}, [clearFilters, setGroupByColumn, reports, setActiveReport]);
61+
}, [setGroupByColumn, reports, setActiveReport]);
6462

6563
// Sync active page to URL
6664
useEffect(() => {

0 commit comments

Comments
 (0)