Separate tabs and narratives on tab panels

This commit is contained in:
Franc Camps-Febrer
2018-12-04 16:12:51 +00:00
parent 9c60dfee03
commit 36c2a5a672
4 changed files with 87 additions and 38 deletions

View File

@@ -8,6 +8,7 @@ import {
RESET_ALLFILTERS,
TOGGLE_LANGUAGE,
TOGGLE_MAPVIEW,
TOGGLE_GUIDEDMODE,
FETCH_ERROR,
} from '../actions';
@@ -87,6 +88,12 @@ function toggleMapView(appState, action) {
});
}
function toggleGuidedMode(appState, action) {
return Object.assign({}, appState, {
isModeGuided: !appState.isModeGuided
})
}
function fetchError(state, action) {
return {
...state,
@@ -112,6 +119,8 @@ function app(appState = initial.app, action) {
return toggleLanguage(appState, action);
case TOGGLE_MAPVIEW:
return toggleMapView(appState, action);
case TOGGLE_GUIDEDMODE:
return toggleGuidedMode(appState, action);
case FETCH_ERROR:
return fetchError(appState, action);
default: