From 47b3ba803028892b92b74cd4c37a7d81369ffc48 Mon Sep 17 00:00:00 2001 From: Jonathan Rainville Date: Tue, 7 Aug 2018 14:19:39 -0400 Subject: [PATCH] fix no rendering on subscriptions --- .../src/containers/CommunicationContainer.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/embark-ui/src/containers/CommunicationContainer.js b/embark-ui/src/containers/CommunicationContainer.js index e13e6700..7dd6f31a 100644 --- a/embark-ui/src/containers/CommunicationContainer.js +++ b/embark-ui/src/containers/CommunicationContainer.js @@ -20,12 +20,12 @@ class CommunicationContainer extends Component { render() { let isEnabledMessage = ''; - if (this.props.version === undefined || this.props.version === null) { + if (this.props.messages.version === undefined || this.props.messages.version === null) { isEnabledMessage = Checking Whisper support, please wait; - } else if (!this.props.version) { + } else if (!this.props.messages.version) { isEnabledMessage = The node you are using does not support Whisper; - } else if (this.props.version === -1) { + } else if (this.props.messages.version === -1) { isEnabledMessage = The node uses an unsupported version of Whisper; } @@ -34,8 +34,8 @@ class CommunicationContainer extends Component { {isEnabledMessage} this.listenToChannel(channel)} sendMessage={(channel, message) => this.sendMessage(channel, message)} - channels={this.props.channels} - subscriptions={this.props.subscriptions}/> + channels={this.props.messages.channels} + subscriptions={this.props.messages.subscriptions}/> ); } @@ -45,16 +45,12 @@ CommunicationContainer.propTypes = { messageSend: PropTypes.func, messageListen: PropTypes.func, communicationVersion: PropTypes.func, - channels: PropTypes.object, - subscriptions: PropTypes.array, - version: PropTypes.number + messages: PropTypes.object }; function mapStateToProps(state) { return { - channels: state.messages.channels, - subscriptions: state.messages.subscriptions, - version: state.messages.version + messages: state.messages }; }