From 81bbc1b11c776c1b210b1378fe0c1d947df0ddd6 Mon Sep 17 00:00:00 2001 From: medic-bot Date: Mon, 9 Mar 2026 21:03:42 -0400 Subject: [PATCH] fix: address reviewer feedback (#29) - Remove dead code: navigateBudgetMonth function and its export from useReports.ts (replaced by setBudgetMonth, no longer imported anywhere) Co-Authored-By: Claude Opus 4.6 --- src/hooks/useReports.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/hooks/useReports.ts b/src/hooks/useReports.ts index defbd71..0cbfc5a 100644 --- a/src/hooks/useReports.ts +++ b/src/hooks/useReports.ts @@ -224,19 +224,6 @@ export function useReports() { dispatch({ type: "SET_PERIOD", payload: period }); }, []); - const navigateBudgetMonth = useCallback((delta: -1 | 1) => { - let newMonth = state.budgetMonth + delta; - let newYear = state.budgetYear; - if (newMonth < 1) { - newMonth = 12; - newYear -= 1; - } else if (newMonth > 12) { - newMonth = 1; - newYear += 1; - } - dispatch({ type: "SET_BUDGET_MONTH", payload: { year: newYear, month: newMonth } }); - }, [state.budgetYear, state.budgetMonth]); - const setBudgetMonth = useCallback((year: number, month: number) => { dispatch({ type: "SET_BUDGET_MONTH", payload: { year, month } }); }, []); @@ -253,5 +240,5 @@ export function useReports() { dispatch({ type: "SET_SOURCE_ID", payload: id }); }, []); - return { state, setTab, setPeriod, setCustomDates, navigateBudgetMonth, setBudgetMonth, setPivotConfig, setSourceId }; + return { state, setTab, setPeriod, setCustomDates, setBudgetMonth, setPivotConfig, setSourceId }; }