Redux changes and refactoring
This commit is contained in:
@@ -16,6 +16,7 @@ const versionLookup = Constants.RELEASE_TYPES.map(k=> {
|
||||
export const releaseVersionReducer = createReducer({
|
||||
LocationsLookup: {},
|
||||
Release: 2,
|
||||
ReleaseUpgradeAvailable: false,
|
||||
UpgradeAvailable: false,
|
||||
UpgradeDismissed: false,
|
||||
Version: -1,
|
||||
@@ -42,6 +43,19 @@ export const releaseVersionReducer = createReducer({
|
||||
UpgradeDismissed: action.payload,
|
||||
};
|
||||
},
|
||||
[Actions.SET_RELEASE_DATA]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
LocationsLookup: action.payload.locations,
|
||||
VersionLookup: action.payload.versions,
|
||||
};
|
||||
},
|
||||
[Actions.setReleaseUpgradeAvailable]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
ReleaseUpgradeAvailable: action.payload,
|
||||
};
|
||||
},
|
||||
[Actions.setUIUpgradeData]: (state, action) => {
|
||||
return {
|
||||
...state,
|
||||
|
||||
Reference in New Issue
Block a user