mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-27 23:06:29 -04:00
Typings cleanup and improvements
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createSelector } from 'reselect';
|
||||
import { DownloadClientAppState } from 'App/State/SettingsAppState';
|
||||
import DownloadProtocol from 'DownloadClient/DownloadProtocol';
|
||||
import createSortedSectionSelector from 'Store/Selectors/createSortedSectionSelector';
|
||||
import sortByName from 'Utilities/Array/sortByName';
|
||||
@@ -8,7 +9,7 @@ export default function createEnabledDownloadClientsSelector(
|
||||
) {
|
||||
return createSelector(
|
||||
createSortedSectionSelector('settings.downloadClients', sortByName),
|
||||
(downloadClients) => {
|
||||
(downloadClients: DownloadClientAppState) => {
|
||||
const { isFetching, isPopulated, error, items } = downloadClients;
|
||||
|
||||
const clients = items.filter(
|
||||
|
||||
@@ -5,6 +5,7 @@ export function createSeriesSelectorForHook(seriesId) {
|
||||
(state) => state.series.itemMap,
|
||||
(state) => state.series.items,
|
||||
(itemMap, allSeries) => {
|
||||
|
||||
return seriesId ? allSeries[itemMap[seriesId]]: undefined;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user