summaryrefslogtreecommitdiff
path: root/src/redux/preference/actions.js
diff options
context:
space:
mode:
authorKamran Ahmed <kamranahmed.se@gmail.com>2018-08-19 21:24:13 +0400
committerKamran Ahmed <kamranahmed.se@gmail.com>2018-08-19 21:24:13 +0400
commit6ca7bd64e8253f04beb44d00644a537cfeeb74ff (patch)
tree0e5548398fe03102aabb051f487a3175b48eaee3 /src/redux/preference/actions.js
parentRestructure and add router (diff)
downloadgithunt-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.js19
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
+ });
+ };
+};