1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-23 22:25:56 -04:00

Convert FilterBuilder types to TypeScript

This commit is contained in:
Mark McDowall
2025-01-09 19:11:41 -08:00
parent 8482f3da1a
commit 4849d1da10
8 changed files with 153 additions and 84 deletions
+3 -3
View File
@@ -1,5 +1,6 @@
import { createAction } from 'redux-actions';
import { filterBuilderTypes, filterBuilderValueTypes, filterTypePredicates, filterTypes, sortDirections } from 'Helpers/Props';
import { filterBuilderTypes, filterBuilderValueTypes, filterTypes, sortDirections } from 'Helpers/Props';
import getFilterTypePredicate from 'Helpers/Props/getFilterTypePredicate';
import { createThunk, handleThunks } from 'Store/thunks';
import sortByProp from 'Utilities/Array/sortByProp';
import createAjaxRequest from 'Utilities/createAjaxRequest';
@@ -107,8 +108,7 @@ export const defaultState = {
},
languages: function(item, filterValue, type) {
const predicate = filterTypePredicates[type];
const predicate = getFilterTypePredicate(type);
const languages = item.languages.map((language) => language.name);
return predicate(languages, filterValue);