summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2015-11-02 14:20:54 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2015-11-02 14:20:54 -0500
commite52669c2da0bb78c225a5c87edebe472e4c7ac56 (patch)
treea311de9975f99ab26396510c7261bfc30f799495 /web/react/components/sidebar.jsx
parent31eee1ef6ebb59a89885ef7e3ebd6801f9a396d4 (diff)
parentd4ec6d3bf42d257851304fe9588f2db8bbbefa13 (diff)
downloadchat-e52669c2da0bb78c225a5c87edebe472e4c7ac56.tar.gz
chat-e52669c2da0bb78c225a5c87edebe472e4c7ac56.tar.bz2
chat-e52669c2da0bb78c225a5c87edebe472e4c7ac56.zip
Merge pull request #1249 from mattermost/plt-823
PLT-823 Refactor of center channel
Diffstat (limited to 'web/react/components/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx17
1 files changed, 4 insertions, 13 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index a69fd48fc..023955e97 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -178,10 +178,6 @@ export default class Sidebar extends React.Component {
window.addEventListener('resize', this.handleResize);
}
shouldComponentUpdate(nextProps, nextState) {
- if (!Utils.areStatesEqual(nextProps, this.props)) {
- return true;
- }
-
if (!Utils.areStatesEqual(nextState, this.state)) {
return true;
}
@@ -235,7 +231,7 @@ export default class Sidebar extends React.Component {
const unread = this.getUnreadCount();
const mentionTitle = unread.mentions > 0 ? '(' + unread.mentions + ') ' : '';
const unreadTitle = unread.msgs > 0 ? '* ' : '';
- document.title = mentionTitle + unreadTitle + currentChannelName + ' - ' + this.props.teamDisplayName + ' ' + currentSiteName;
+ document.title = mentionTitle + unreadTitle + currentChannelName + ' - ' + TeamStore.getCurrent().display_name + ' ' + currentSiteName;
}
}
onScroll() {
@@ -543,9 +539,9 @@ export default class Sidebar extends React.Component {
/>
<SidebarHeader
- teamDisplayName={this.props.teamDisplayName}
- teamName={this.props.teamName}
- teamType={this.props.teamType}
+ teamDisplayName={TeamStore.getCurrent().display_name}
+ teamName={TeamStore.getCurrent().name}
+ teamType={TeamStore.getCurrent().type}
/>
<SearchBox />
@@ -631,11 +627,6 @@ export default class Sidebar extends React.Component {
}
Sidebar.defaultProps = {
- teamType: '',
- teamDisplayName: ''
};
Sidebar.propTypes = {
- teamType: React.PropTypes.string,
- teamDisplayName: React.PropTypes.string,
- teamName: React.PropTypes.string
};