Skip to content

Conversation

@Abdkhan14
Copy link
Contributor

Screenshot 2025-11-25 at 4 21 12 PM Screenshot 2025-11-25 at 3 54 48 PM Screenshot 2025-11-25 at 4 20 29 PM

@Abdkhan14 Abdkhan14 requested a review from a team as a code owner November 25, 2025 21:27
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Nov 25, 2025
feedbackLink: <FeedbackLink />,
}),
},
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: React hook called at module scope

The ERROR_STATE_CONFIG object is defined at module scope and includes JSX elements that render FeedbackLink components. Since FeedbackLink calls the useFeedbackForm() hook, this violates React's rules of hooks by executing a hook outside of a component render cycle. This will cause a runtime error when the module loads. The config object needs to be moved inside the ErrorState component or use a function that returns the config dynamically during render.

Fix in Cursor Fix in Web

ERROR_STATE_CONFIG[error?.status ?? 'default'] ?? ERROR_STATE_CONFIG.default;

return (
<Flex direction="column" gap="2xl" padding="3xl" align="center" justify="center">
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: There is also the <Stack /> for flex column, removing one prop from being added 😄

@Abdkhan14 Abdkhan14 merged commit fc5f5fd into master Nov 27, 2025
48 checks passed
@Abdkhan14 Abdkhan14 deleted the abdk/explore-attr-breakdowns-states branch November 27, 2025 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants