mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-25 22:59:10 -04:00
Convert some selectors to Typescript
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { createSelector } from 'reselect';
|
||||
import AppState from 'App/State/AppState';
|
||||
import { createIndexerSelectorForHook } from './createIndexerSelector';
|
||||
|
||||
function createIndexerAppProfileSelector(indexerId: number) {
|
||||
return createSelector(
|
||||
(state: AppState) => state.settings.appProfiles.items,
|
||||
createIndexerSelectorForHook(indexerId),
|
||||
(appProfiles, indexer = {}) => {
|
||||
return appProfiles.find((profile) => {
|
||||
return profile.id === indexer.appProfileId;
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default createIndexerAppProfileSelector;
|
||||
Reference in New Issue
Block a user