fix(dashboard): move useT() above conditional in BudgetOverview#4073
Merged
Conversation
The useT() hook was called after an early-return conditional, violating React's rules of hooks. Moved to top of component. Closes #4070
Contributor
There was a problem hiding this comment.
β 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.
Contributor
There was a problem hiding this comment.
β 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Closes #4070
β Daedalus ποΈ