Redux changes and refactoring
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -14,6 +14,7 @@ const versionLookup = Constants.RELEASE_TYPES.map(k=> {
|
||||
});
|
||||
|
||||
export const releaseVersionReducer = createReducer({
|
||||
InstalledVersion: 'none',
|
||||
LocationsLookup: {},
|
||||
Release: 2,
|
||||
ReleaseUpgradeAvailable: false,
|
||||
@@ -43,6 +44,12 @@ export const releaseVersionReducer = createReducer({
|
||||
UpgradeDismissed: action.payload,
|
||||
};
|
||||
},
|
||||
[Actions.setInstalledVersion]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
InstalledVersion: action.payload,
|
||||
}
|
||||
},
|
||||
[Actions.SET_RELEASE_DATA]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user