aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js b/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
index 46fc58db95..e63bcb16af 100644
--- a/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
+++ b/openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js
@@ -16,9 +16,19 @@
import {actionTypes, enums} from './OnboardingConstants.js';
export const currentScreenReducer = (state = {forceBreadCrumbsUpdate: false, screen: enums.SCREEN.ONBOARDING_CATALOG, props: {}}, action) => {
- if (action.type === actionTypes.SET_CURRENT_SCREEN) {
- return action.currentScreen;
- }
- return state;
+ switch (action.type) {
+ case actionTypes.SET_CURRENT_SCREEN:
+ return action.currentScreen;
+ case actionTypes.SET_CURRENT_SCREEN_VERSION:
+ return {
+ ...state,
+ props: {
+ ...state.props,
+ version: action.version
+ }
+ };
+ default:
+ return state;
+ }
};