Skip to content

Commit

Permalink
fix(ui): rename variable component to Component (argoproj#13983)
Browse files Browse the repository at this point in the history
Eliminates an error in SonarCloud.
See:
  https://www.matheusmello.io/posts/react-hook-useeffect-is-called-in-function-that-is-neither-a-react-function

Signed-off-by: Craig Rodrigues <craig@quiknode.io>
  • Loading branch information
rodrigc committed Jun 10, 2023
1 parent 330252d commit 0c143f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/shared/components/monaco-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const DEFAULT_LINE_HEIGHT = 18;

const MonacoEditorLazy = React.lazy(() =>
import('monaco-editor').then(monaco => {
const component = (props: MonacoProps) => {
const Component = (props: MonacoProps) => {
const [height, setHeight] = React.useState(0);

React.useEffect(() => {
Expand Down Expand Up @@ -81,7 +81,7 @@ const MonacoEditorLazy = React.lazy(() =>
};

return {
default: component
default: Component
};
})
);
Expand Down

0 comments on commit 0c143f9

Please sign in to comment.