summaryrefslogtreecommitdiff
path: root/app/client/live/reducer.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-21 02:49:46 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-21 02:49:46 +0200
commite05904f2e992ce3184952a8e569d9c28d85d68de (patch)
tree50c4af17d282384be4cc34a0adfc6dc823fc3261 /app/client/live/reducer.js
parent135fde231646f8f8838cdf16ddb0bc3ad2e94d3a (diff)
basic css for form elements
Diffstat (limited to 'app/client/live/reducer.js')
-rw-r--r--app/client/live/reducer.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/client/live/reducer.js b/app/client/live/reducer.js
new file mode 100644
index 0000000..9d41c6f
--- /dev/null
+++ b/app/client/live/reducer.js
@@ -0,0 +1,35 @@
+import { combineReducers } from 'redux'
+
+const liveInitialState = {
+ loading: false,
+ error: null,
+ opt: {},
+}
+
+const liveReducer = (state = liveInitialState, action) => {
+ let results;
+
+ switch(action.type) {
+ case 'LIVE_LOAD_OPT_FROM_SERVER':
+ return {
+ ...state,
+ loading: false,
+ error: null,
+ opt: action.opt,
+ }
+
+ case 'LIVE_SET_OPT':
+ return {
+ ...state,
+ opt: {
+ ...state.opt,
+ [action.key]: action.value,
+ }
+ }
+
+ default:
+ return state
+ }
+}
+
+export default liveReducer