Skip to content

Commit

Permalink
fixup! Add type for versioned group
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Nov 14, 2024
1 parent 9af1340 commit 26725ee
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const useSortAndFilter = (
const resourceGroups = sortAndFilter(groups, _sortGroups, _sortResources)
setState(resourceGroups)
}
}, [sortMethod, selectedFilterOptions, originalData, setState, sortAndFilter])
}, [sortMethod, originalData, setState, sortAndFilter])

function sortAndFilter<T extends Group>(

Check warning on line 50 in static-site/src/components/ListResources/useSortAndFilter.ts

View workflow job for this annotation

GitHub Actions / lint

The 'sortAndFilter' function makes the dependencies of useMemo Hook (at line 48) change on every render. Move it inside the useMemo callback. Alternatively, wrap the definition of 'sortAndFilter' in its own useCallback() Hook
groups: T[],
Expand Down

0 comments on commit 26725ee

Please sign in to comment.