diff options
Diffstat (limited to 'app/assets/javascripts/components/reducers')
-rw-r--r-- | app/assets/javascripts/components/reducers/index.jsx | 4 | ||||
-rw-r--r-- | app/assets/javascripts/components/reducers/meta.jsx | 13 |
2 files changed, 16 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/reducers/index.jsx b/app/assets/javascripts/components/reducers/index.jsx index c7e858f38..96c026c8c 100644 --- a/app/assets/javascripts/components/reducers/index.jsx +++ b/app/assets/javascripts/components/reducers/index.jsx @@ -1,6 +1,8 @@ import { combineReducers } from 'redux-immutable'; import statuses from './statuses'; +import meta from './meta'; export default combineReducers({ - statuses + statuses, + meta }); 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; + } +} |