Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Dec 21, 2024
1 parent e0d84a6 commit ca971f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/search-manager/FilterByBlockType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,11 @@ const FilterByBlockType: React.FC<FilterByBlockTypeProps> = ({ disabled = false
setProblemTypesFilter,
} = useSearchContext();

const clearFilters = useCallback(/* istanbul ignore next */ () => {
setBlockTypesFilter([]);
setProblemTypesFilter([]);
}, []);

useEffect(() => {
if (disabled) {
// Clear filters when disabled
Expand All @@ -240,11 +245,6 @@ const FilterByBlockType: React.FC<FilterByBlockTypeProps> = ({ disabled = false
return () => {};
}, [disabled]);

const clearFilters = useCallback(/* istanbul ignore next */ () => {
setBlockTypesFilter([]);
setProblemTypesFilter([]);
}, []);

// Sort blocktypes in order of hierarchy followed by alphabetically for components
const sortedBlockTypeKeys = Object.keys(blockTypes).sort((a, b) => {
const order = {
Expand Down

0 comments on commit ca971f5

Please sign in to comment.