Fixed: Updates to commandExecutingSelector

This commit is contained in:
Qstick
2018-09-04 22:40:26 -04:00
parent 68aaa49e9f
commit e41f884153
16 changed files with 57 additions and 73 deletions
@@ -1,10 +1,9 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import combinePath from 'Utilities/String/combinePath';
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
import { executeCommand } from 'Store/Actions/commandActions';
import { fetchLogFiles } from 'Store/Actions/systemActions';
import * as commandNames from 'Commands/commandNames';
@@ -14,8 +13,8 @@ function createMapStateToProps() {
return createSelector(
(state) => state.system.logFiles,
(state) => state.system.status.item,
createCommandsSelector(),
(logFiles, status, commands) => {
createCommandExecutingSelector(commandNames.DELETE_LOG_FILES),
(logFiles, status, deleteFilesExecuting) => {
const {
isFetching,
items
@@ -26,8 +25,6 @@ function createMapStateToProps() {
isWindows
} = status;
const deleteFilesExecuting = _.some(commands, { name: commandNames.DELETE_LOG_FILES });
return {
isFetching,
items,