mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
Convert store selectors to Typescript
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { some } from 'lodash';
|
||||
import { createSelector } from 'reselect';
|
||||
import AppState from 'App/State/AppState';
|
||||
import createAllIndexersSelector from './createAllIndexersSelector';
|
||||
|
||||
function createExistingIndexerSelector() {
|
||||
return createSelector(
|
||||
(_: AppState, { definitionName }: { definitionName: string }) =>
|
||||
definitionName,
|
||||
createAllIndexersSelector(),
|
||||
(definitionName, indexers) => {
|
||||
return some(indexers, { definitionName });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
export default createExistingIndexerSelector;
|
||||
Reference in New Issue
Block a user