mirror of
https://github.com/Prowlarr/Prowlarr
synced 2025-12-06 08:34:28 +01:00
17 lines
556 B
TypeScript
17 lines
556 B
TypeScript
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;
|