2017-09-04 02:20:56 +00:00
|
|
|
import { createSelector } from 'reselect';
|
2018-09-05 02:40:26 +00:00
|
|
|
import { isCommandExecuting } from 'Utilities/Command';
|
|
|
|
import createCommandSelector from './createCommandSelector';
|
2017-09-04 02:20:56 +00:00
|
|
|
|
2023-07-30 13:23:41 +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;
|