Convert some selectors to Typescript

This commit is contained in:
Bogdan
2023-07-29 03:13:40 +03:00
parent eee1be784b
commit cab50b35aa
13 changed files with 86 additions and 22 deletions
@@ -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;