Skip to content

Commit

Permalink
Bump deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
joarau committed Nov 6, 2024
1 parent 2cb8037 commit 427fa52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stilling/stilling/edit/om-stillingen/janzz/Janzz.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Janzz: FunctionComponent<Props> = ({ tittel }) => {

useEffect(() => {
setInput(tittel);
dispatch({ type: SET_JANZZ, undefined });
dispatch({ type: SET_JANZZ, payload: undefined });
}, [tittel]);

Check warning on line 26 in src/stilling/stilling/edit/om-stillingen/janzz/Janzz.tsx

View workflow job for this annotation

GitHub Actions / Bygg og push

React Hook useEffect has a missing dependency: 'dispatch'. Either include it or remove the dependency array

const onChange = (event: React.ChangeEvent<HTMLInputElement> | null, value?: string) => {
Expand All @@ -31,14 +31,14 @@ const Janzz: FunctionComponent<Props> = ({ tittel }) => {

const onToggleSelected = (option: string, isSelected: boolean) => {
if (!isSelected || !suggestions) {
dispatch({ type: SET_JANZZ, undefined });
dispatch({ type: SET_JANZZ, payload: undefined });
return;
}

const found = suggestions.find(({ label }) => label.toLowerCase() === option.toLowerCase());

if (!found) {
dispatch({ type: SET_JANZZ, undefined });
dispatch({ type: SET_JANZZ, payload: undefined });
return;
}

Expand All @@ -55,7 +55,7 @@ const Janzz: FunctionComponent<Props> = ({ tittel }) => {
},
];

dispatch({ type: SET_JANZZ, kategori });
dispatch({ type: SET_JANZZ, payload: kategori });
setInput(capitalizeEmployerName(found.label) || '');
};

Expand Down

0 comments on commit 427fa52

Please sign in to comment.