2019-04-06 03:03:42 +00:00
|
|
|
import { createSelector } from 'reselect';
|
2023-07-30 13:23:41 +00:00
|
|
|
import AppState from 'App/State/AppState';
|
2019-04-06 03:03:42 +00:00
|
|
|
import { isCommandExecuting } from 'Utilities/Command';
|
|
|
|
|
|
|
|
function createExecutingCommandsSelector() {
|
|
|
|
return createSelector(
|
2023-07-30 13:23:41 +00:00
|
|
|
(state: AppState) => state.commands.items,
|
2019-04-06 03:03:42 +00:00
|
|
|
(commands) => {
|
|
|
|
return commands.filter((command) => isCommandExecuting(command));
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default createExecutingCommandsSelector;
|