diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-19 21:24:13 +0400 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-19 21:24:13 +0400 |
| commit | 6ca7bd64e8253f04beb44d00644a537cfeeb74ff (patch) | |
| tree | 0e5548398fe03102aabb051f487a3175b48eaee3 /src/redux/preference/actions.js | |
| parent | Restructure and add router (diff) | |
| download | githunt-6ca7bd64e8253f04beb44d00644a537cfeeb74ff.tar.gz | |
Add redux/redux-persist and option reducer
Diffstat (limited to 'src/redux/preference/actions.js')
| -rw-r--r-- | src/redux/preference/actions.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/redux/preference/actions.js b/src/redux/preference/actions.js new file mode 100644 index 0000000..1045b6b --- /dev/null +++ b/src/redux/preference/actions.js @@ -0,0 +1,19 @@ +import { UPDATE_OPTIONS, UPDATE_VIEW_TYPE } from './types'; + +export const updateOptions = function (setting) { + return dispatch => { + dispatch({ + type: UPDATE_OPTIONS, + payload: setting, + }); + }; +}; + +export const updateViewType = function (viewType = 'grid') { + return dispatch => { + dispatch({ + type: UPDATE_VIEW_TYPE, + payload: viewType + }); + }; +}; |
