Redux changes and refactoring

This commit is contained in:
Scott E. Graves
2019-06-07 23:13:05 -05:00
parent 6499ff4f79
commit 4b93c298c2
9 changed files with 75 additions and 45 deletions

View File

@@ -1,10 +1,11 @@
import {createReducer} from 'redux-starter-kit';
import {setInstallActive, setInstallComplete} from '../actions/install_actions';
import {setInstallActive, setInstallComplete, setMissingDependencies} from '../actions/install_actions';
export const installReducer = createReducer({
InstallActive: false,
InstallResult: null,
InstallType: null,
MissingDependencies: [],
}, {
[setInstallActive]: (state, action) => {
return {
@@ -21,5 +22,11 @@ export const installReducer = createReducer({
InstallResult: action.payload,
InstallType: null,
}
},
[setMissingDependencies]: (state, action) => {
return {
...state,
MissingDependencies: action.payload,
}
}
});