From 289ed2bda8d8c8c27247cfad7c4fa8d830a542da Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Wed, 8 Aug 2018 15:10:30 -0400 Subject: [PATCH] remove messages reducer --- embark-ui/src/reducers/messagesReducer.js | 36 ----------------------- 1 file changed, 36 deletions(-) delete mode 100644 embark-ui/src/reducers/messagesReducer.js diff --git a/embark-ui/src/reducers/messagesReducer.js b/embark-ui/src/reducers/messagesReducer.js deleted file mode 100644 index dac9ef3d1..000000000 --- a/embark-ui/src/reducers/messagesReducer.js +++ /dev/null @@ -1,36 +0,0 @@ -import * as actions from "../actions"; - -export default function messages(state = {channels: {}}, action) { - switch (action.type) { - case actions.MESSAGE_LISTEN[actions.SUCCESS]: { - const messages = state.channels[action.channel] ? state.channels[action.channel].messages : []; - messages.push(action.message.data); - return { - ...state, - channels: { - ...state.channels, - [action.channel]: { - ...state.channels[action.channel], - messages: messages - } - } - }; - } - case actions.MESSAGE_LISTEN[actions.REQUEST]: { - const subscriptions = state.subscriptions || []; - subscriptions.push(action.channel); - return { - ...state, - subscriptions: subscriptions - }; - } - case actions.MESSAGE_VERSION[actions.SUCCESS]: { - return { - ...state, - version: action.version.data - }; - } - default: - return state; - } -}