Lidarr/frontend/src/Store/Selectors/createCommandExecutingSelec...

12 lines
410 B
TypeScript
Raw Normal View History

2017-09-04 02:20:56 +00:00
import { createSelector } from 'reselect';
import { isCommandExecuting } from 'Utilities/Command';
import createCommandSelector from './createCommandSelector';
2017-09-04 02:20:56 +00:00
function createCommandExecutingSelector(name: string, contraints = {}) {
return createSelector(createCommandSelector(name, contraints), (command) => {
return isCommandExecuting(command);
});
2017-09-04 02:20:56 +00:00
}
export default createCommandExecutingSelector;