frontend: AppContainer.stories: rename withEnv to WithEnv to fix rules-of-hooks#5210
frontend: AppContainer.stories: rename withEnv to WithEnv to fix rules-of-hooks#5210jedbillyb wants to merge 3 commits intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jedbillyb The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
This PR addresses an ESLint react-hooks/rules-of-hooks warning in the Storybook story for AppContainer by renaming a hooks-using decorator to PascalCase so it is treated as a React component by the hooks rules.
Changes:
- Renamed the Storybook decorator
withEnvtoWithEnv. - Updated the story’s
decoratorsarray to referenceWithEnv.
skoeva
left a comment
There was a problem hiding this comment.
can you squash the merge commits in this PR? these docs should be helpful
Fixes #5184
Renames
withEnvdecorator toWithEnv(PascalCase) so Reactrecognises it as a component and hooks are valid per rules-of-hooks.
Steps to test:
npx eslint src/components/App/AppContainer.stories.tsx- no warnings