Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): rename variable component to Component #13983

Merged
merged 1 commit into from
Jun 10, 2023
Merged

fix(ui): rename variable component to Component #13983

merged 1 commit into from
Jun 10, 2023

Conversation

rodrigc
Copy link
Contributor

@rodrigc rodrigc commented Jun 9, 2023

Eliminates an error in SonarCloud.
See:
https://www.matheusmello.io/posts/react-hook-useeffect-is-called-in-function-that-is-neither-a-react-function

Sonarcloud here: https://sonarcloud.io/project/issues?resolved=false&sinceLeakPeriod=true&types=BUG&id=argoproj_argo-cd&open=AYgq_rVTO8LpPhECxvHV
is reporting:

React Hook "React.useEffect" is called in function "component" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (330252d) 49.56% compared to head (b6aa5bb) 49.56%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13983   +/-   ##
=======================================
  Coverage   49.56%   49.56%           
=======================================
  Files         256      256           
  Lines       43920    43920           
=======================================
  Hits        21770    21770           
  Misses      19987    19987           
  Partials     2163     2163           

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

I wondered what the heck was going on with that error. Thanks @rodrigc!

@crenshaw-dev crenshaw-dev merged commit 0c143f9 into argoproj:master Jun 10, 2023
@rodrigc rodrigc deleted the fix-use-effect-warning branch June 10, 2023 02:15
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
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.

2 participants