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,9 +1,8 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { createSelector } from 'reselect';
import createCommandsSelector from 'Store/Selectors/createCommandsSelector';
import createCommandExecutingSelector from 'Store/Selectors/createCommandExecutingSelector';
import { fetchBackups, deleteBackup } from 'Store/Actions/systemActions';
import { executeCommand } from 'Store/Actions/commandActions';
import * as commandNames from 'Commands/commandNames';
@@ -12,8 +11,8 @@ import Backups from './Backups';
function createMapStateToProps() {
return createSelector(
(state) => state.system.backups,
createCommandsSelector(),
(backups, commands) => {
createCommandExecutingSelector(commandNames.BACKUP),
(backups, backupExecuting) => {
const {
isFetching,
isPopulated,
@@ -21,8 +20,6 @@ function createMapStateToProps() {
items
} = backups;
const backupExecuting = _.some(commands, { name: commandNames.BACKUP });
return {
isFetching,
isPopulated,