From bc4fa6b198557a7f3989eb0865e2c77ac7451d29 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Sun, 3 Dec 2017 23:26:40 -0800 Subject: Rename themes -> flavours ? ? --- app/javascript/flavours/glitch/reducers/cards.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/javascript/flavours/glitch/reducers/cards.js (limited to 'app/javascript/flavours/glitch/reducers/cards.js') diff --git a/app/javascript/flavours/glitch/reducers/cards.js b/app/javascript/flavours/glitch/reducers/cards.js new file mode 100644 index 000000000..92ecfd086 --- /dev/null +++ b/app/javascript/flavours/glitch/reducers/cards.js @@ -0,0 +1,14 @@ +import { STATUS_CARD_FETCH_SUCCESS } from 'flavours/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