about summary refs log tree commit diff
path: root/app/assets/javascripts/components/reducers/meta.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/reducers/meta.jsx')
-rw-r--r--app/assets/javascripts/components/reducers/meta.jsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/reducers/meta.jsx b/app/assets/javascripts/components/reducers/meta.jsx
new file mode 100644
index 000000000..401be435d
--- /dev/null
+++ b/app/assets/javascripts/components/reducers/meta.jsx
@@ -0,0 +1,13 @@
+import { SET_ACCESS_TOKEN }         from '../actions/meta';
+import Immutable                    from 'immutable';
+
+const initialState = Immutable.Map();
+
+export default function meta(state = initialState, action) {
+  switch(action.type) {
+    case SET_ACCESS_TOKEN:
+      return state.set('access_token', action.token);
+    default:
+      return state;
+  }
+}