From e7ea080fd332ca563c3e5e4ea4ed24d86ebf884d Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 29 Mar 2016 19:24:53 -0400 Subject: Fixing react warnings on permalink return --- webapp/components/permalink_view.jsx | 11 ++++++----- webapp/components/posts_view.jsx | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/permalink_view.jsx b/webapp/components/permalink_view.jsx index 8e49019ee..2ebe52356 100644 --- a/webapp/components/permalink_view.jsx +++ b/webapp/components/permalink_view.jsx @@ -28,18 +28,19 @@ export default class PermalinkView extends React.Component { const channel = ChannelStore.getCurrent(); const channelId = channel ? channel.id : ''; const channelName = channel ? channel.name : ''; - const teamURL = TeamStore.getCurrentTeamUrl(); + const team = TeamStore.getCurrent(); + const teamName = team ? team.name : ''; const profiles = JSON.parse(JSON.stringify(UserStore.getProfiles())); return { channelId, channelName, profiles, - teamURL, + teamName, postId }; } isStateValid() { - return this.state.channelId !== '' && this.state.profiles && this.state.teamURL; + return this.state.channelId !== '' && this.state.profiles && this.state.teamName; } updateState() { this.setState(this.getStateFromStores(this.props)); @@ -64,7 +65,7 @@ export default class PermalinkView extends React.Component { return true; } - if (nextState.teamURL !== this.state.teamURL) { + if (nextState.teamName !== this.state.teamName) { return true; } @@ -87,7 +88,7 @@ export default class PermalinkView extends React.Component { id='archive-link-home' >