Skip to content

Commit

Permalink
Get rid of obsolete eslint-disable-next-line in search-result
Browse files Browse the repository at this point in the history
We were using this eslint-disable to only use a useEffect once - on
load. We achieve the same by adding the function used inside the
useEffect.
  • Loading branch information
Adamik10 committed Mar 22, 2024
1 parent 0558cc4 commit ecf7ca9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/apps/search-result/search-result.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ const SearchResult: React.FC<SearchResultProps> = ({ q, pageSize }) => {
useEffect(() => {
addFilterFromUrlParamListener(FacetField.MaterialTypesSpecific);
addFilterFromUrlParamListener(FacetField.WorkTypes);
// We only want to do this once, so we need the dependency array empty
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [addFilterFromUrlParamListener]);

const { data, isLoading } = useSearchWithPaginationQuery({
q: { all: q },
Expand Down

0 comments on commit ecf7ca9

Please sign in to comment.