From 3ad9ca723f75df429544c75720792adabbb19267 Mon Sep 17 00:00:00 2001 From: Hephaestus Date: Sat, 23 May 2026 08:22:40 +0200 Subject: [PATCH] fix(dashboard): move useT() above conditional in BudgetOverview The useT() hook was called after an early-return conditional, violating React's rules of hooks. Moved to top of component. Closes #4070 --- dashboard/src/pages/CostPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboard/src/pages/CostPage.tsx b/dashboard/src/pages/CostPage.tsx index c4c3f0a8..0009ebbd 100644 --- a/dashboard/src/pages/CostPage.tsx +++ b/dashboard/src/pages/CostPage.tsx @@ -113,8 +113,8 @@ interface BudgetOverviewProps { } function BudgetOverview({ dailyData, budgetSettings, navigateToSettings }: BudgetOverviewProps) { - if (!budgetSettings.budgetAlertEnabled) { const t = useT(); + if (!budgetSettings.budgetAlertEnabled) { return (