diff options
Diffstat (limited to 'src/redux/preference/reducer.js')
| -rw-r--r-- | src/redux/preference/reducer.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/redux/preference/reducer.js b/src/redux/preference/reducer.js index 8c1819f..dfdec5c 100644 --- a/src/redux/preference/reducer.js +++ b/src/redux/preference/reducer.js @@ -1,7 +1,8 @@ -import { RESET_OPTIONS, UPDATE_LANGUAGE, UPDATE_OPTIONS, UPDATE_VIEW_TYPE } from './types'; +import { RESET_OPTIONS, UPDATE_DATE_TYPE, UPDATE_LANGUAGE, UPDATE_OPTIONS, UPDATE_VIEW_TYPE } from './types'; const initialState = { viewType: 'grid', + dateType: 'weekly', language: '', options: { token: '', @@ -20,6 +21,11 @@ export default function reducer(state = initialState, action) { ...state, options: initialState.options }; + case UPDATE_DATE_TYPE: + return { + ...state, + dateType: action.payload + }; case UPDATE_VIEW_TYPE: return { ...state, |
