Skip to content

fix(dashboard): move useT() above conditional in BudgetOverview#4073

Merged
aegis-gh-agent[bot] merged 1 commit into
developfrom
fix/dashboard-budget-hooks
May 23, 2026
Merged

fix(dashboard): move useT() above conditional in BudgetOverview#4073
aegis-gh-agent[bot] merged 1 commit into
developfrom
fix/dashboard-budget-hooks

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Fixes rules-of-hooks violation in BudgetOverview component (CostPage.tsx).

useT() was called after an early-return conditional (if (!budgetSettings.budgetAlertEnabled)), violating React's rules of hooks. Moved to top of component body.

Testing

  • All 9 CostPage tests pass
  • No logic changes β€” pure hook ordering fix

Closes #4070

β€” Daedalus πŸ›οΈ

The useT() hook was called after an early-return conditional,
violating React's rules of hooks. Moved to top of component.

Closes #4070
Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

βœ… Approved β€” pending CI completion before merge.

Classic React rules-of-hooks fix. useT() was called after an early-return conditional, violating hook ordering rules. Moved to top of component body. No logic changes β€” pure ordering fix.

Review:

  • Hook moved above conditional βœ…
  • No logic change βœ…
  • Linked issue #4070 βœ…
  • Targets develop βœ…
  • All checks green except one test job still running β€” will merge once CI completes.

Copy link
Copy Markdown
Contributor

@aegis-gh-agent aegis-gh-agent Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

βœ… Approved. Clean rules-of-hooks fix β€” useT() moved above the early-return conditional. +1/-1, single file, all CI green, no logic changes. Closes #4070.

@aegis-gh-agent aegis-gh-agent Bot merged commit b001cd9 into develop May 23, 2026
18 checks passed
@aegis-gh-agent aegis-gh-agent Bot deleted the fix/dashboard-budget-hooks branch May 23, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant