Skip to content

Commit

Permalink
🚧 Address react-hooks/exhaustive-deps violations
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Jan 10, 2024
1 parent 80ff382 commit e17c5dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion static-site/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ ignorePatterns:

rules:
react/prop-types: off
react-hooks/exhaustive-deps: off

parserOptions:
sourceType: module
Expand Down
6 changes: 6 additions & 0 deletions static-site/src/components/Groups/edit-logo-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ const EditLogoForm = ({ groupName, createErrorMessage, clearErrorMessage }) => {
let cleanUp = false;
setCurrentLogo();
return () => cleanUp = true;

// FIXME: Figure out what to do with getGroupLogo. If it's added to the
// dependency list, this will get run on every render. It also can't be
// trivially moved outside of the component because it needs
// createErrorMessage and clearErrorMessage.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);

const getGroupLogo = async () => {
Expand Down

0 comments on commit e17c5dc

Please sign in to comment.