diff options
author | Michael Lando <ml636r@att.com> | 2017-08-10 18:21:36 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-08-10 18:21:36 +0000 |
commit | ce07d7cd59425944f85d0fef5126ebeef731bc7b (patch) | |
tree | a0d8bb991aa164e01eb930b23f34d9e27999602a /openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js | |
parent | 46f9fd57f24428f6a6fd0d290b0463e188975231 (diff) | |
parent | 644017cb3edd5b7a077a634ffd5daf2fee6bc088 (diff) |
Merge "[SDC] OnBoard with enabled tests and features"
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js')
-rw-r--r-- | openecomp-ui/src/sdc-app/onboarding/OnboardingReducers.js | 18 |
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; + } }; |