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/cards.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/javascript/themes/glitch/reducers/cards.js (limited to 'app/javascript/themes/glitch/reducers/cards.js') diff --git a/app/javascript/themes/glitch/reducers/cards.js b/app/javascript/themes/glitch/reducers/cards.js new file mode 100644 index 000000000..35be30444 --- /dev/null +++ b/app/javascript/themes/glitch/reducers/cards.js @@ -0,0 +1,14 @@ +import { STATUS_CARD_FETCH_SUCCESS } from 'themes/glitch/actions/cards'; + +import { Map as ImmutableMap, fromJS } from 'immutable'; + +const initialState = ImmutableMap(); + +export default function cards(state = initialState, action) { + switch(action.type) { + case STATUS_CARD_FETCH_SUCCESS: + return state.set(action.id, fromJS(action.card)); + default: + return state; + } +}; -- cgit