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 authored and xiaowu.zhu committed Aug 9, 2023
1 parent 8b539fe commit 20fdf2f
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 20fdf2f

Please sign in to comment.