From 45c44989c8fb6e24badd18bb83ac5f68de0aceaf Mon Sep 17 00:00:00 2001 From: kibigo! Date: Fri, 17 Nov 2017 19:11:18 -0800 Subject: Forking glitch theme --- app/javascript/themes/glitch/reducers/meta.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/javascript/themes/glitch/reducers/meta.js (limited to 'app/javascript/themes/glitch/reducers/meta.js') diff --git a/app/javascript/themes/glitch/reducers/meta.js b/app/javascript/themes/glitch/reducers/meta.js new file mode 100644 index 000000000..2249f1d78 --- /dev/null +++ b/app/javascript/themes/glitch/reducers/meta.js @@ -0,0 +1,16 @@ +import { STORE_HYDRATE } from 'themes/glitch/actions/store'; +import { Map as ImmutableMap } from 'immutable'; + +const initialState = ImmutableMap({ + streaming_api_base_url: null, + access_token: null, +}); + +export default function meta(state = initialState, action) { + switch(action.type) { + case STORE_HYDRATE: + return state.merge(action.state.get('meta')); + default: + return state; + } +}; -- cgit