From 54a064de98f43c55bed429867493e6f5c7e97379 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 31 Mar 2016 10:54:40 -0400 Subject: Fixing username display in center channel --- webapp/components/channel_view.jsx | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'webapp/components/channel_view.jsx') diff --git a/webapp/components/channel_view.jsx b/webapp/components/channel_view.jsx index 54d796ac1..4cca5aa98 100644 --- a/webapp/components/channel_view.jsx +++ b/webapp/components/channel_view.jsx @@ -8,7 +8,6 @@ import PostsViewContainer from 'components/posts_view_container.jsx'; import CreatePost from 'components/create_post.jsx'; import ChannelStore from 'stores/channel_store.jsx'; -import UserStore from 'stores/user_store.jsx'; export default class ChannelView extends React.Component { constructor(props) { @@ -23,14 +22,12 @@ export default class ChannelView extends React.Component { getStateFromStores(props) { const channel = ChannelStore.getByName(props.params.channel); const channelId = channel ? channel.id : ''; - const profiles = JSON.parse(JSON.stringify(UserStore.getProfiles())); return { - channelId, - profiles + channelId }; } isStateValid() { - return this.state.channelId !== '' && this.state.profiles; + return this.state.channelId !== ''; } updateState() { this.setState(this.getStateFromStores(this.props)); @@ -44,13 +41,6 @@ export default class ChannelView extends React.Component { componentWillReceiveProps(nextProps) { this.setState(this.getStateFromStores(nextProps)); } - shouldComponentUpdate(nextProps, nextState) { - if (nextState.channelId !== this.state.channelId) { - return true; - } - - return false; - } render() { return (
- +