summaryrefslogtreecommitdiffstats
path: root/webapp/components/needs_team.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-04-29 08:40:06 -0400
committerChristopher Speller <crspeller@gmail.com>2016-04-29 08:40:06 -0400
commit1f4974dc02c786b65c802d4497fd736cca79d01c (patch)
tree1007e452c4a9345dee8aff113f28f235432bf323 /webapp/components/needs_team.jsx
parent9961ccca7d39bdfabbafce423d3f7fe4b6ed2f29 (diff)
downloadchat-1f4974dc02c786b65c802d4497fd736cca79d01c.tar.gz
chat-1f4974dc02c786b65c802d4497fd736cca79d01c.tar.bz2
chat-1f4974dc02c786b65c802d4497fd736cca79d01c.zip
General react performance improvements (#2796)
* General React performance improvements * Cleaned up unused props/state in PermaLinkView and PostFocusView
Diffstat (limited to 'webapp/components/needs_team.jsx')
-rw-r--r--webapp/components/needs_team.jsx7
1 files changed, 1 insertions, 6 deletions
diff --git a/webapp/components/needs_team.jsx b/webapp/components/needs_team.jsx
index 4aea8fe46..92c6fc0ce 100644
--- a/webapp/components/needs_team.jsx
+++ b/webapp/components/needs_team.jsx
@@ -42,20 +42,18 @@ export default class NeedsTeam extends React.Component {
this.onChanged = this.onChanged.bind(this);
this.state = {
- profiles: UserStore.getProfiles(),
team: TeamStore.getCurrent()
};
}
onChanged() {
this.setState({
- profiles: UserStore.getProfiles(),
team: TeamStore.getCurrent()
});
}
componentWillMount() {
- // Go to tutorial if we are first arrivign
+ // Go to tutorial if we are first arriving
const tutorialStep = PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 999);
if (tutorialStep <= TutorialSteps.INTRO_SCREENS) {
browserHistory.push(Utils.getTeamURLNoOriginFromAddressBar() + '/tutorial');
@@ -63,7 +61,6 @@ export default class NeedsTeam extends React.Component {
}
componentDidMount() {
- UserStore.addChangeListener(this.onChanged);
TeamStore.addChangeListener(this.onChanged);
// Emit view action
@@ -84,7 +81,6 @@ export default class NeedsTeam extends React.Component {
}
componentWillUnmount() {
- UserStore.removeChangeListener(this.onChanged);
TeamStore.removeChangeListener(this.onChanged);
$(window).off('focus');
$(window).off('blur');
@@ -114,7 +110,6 @@ export default class NeedsTeam extends React.Component {
<div className='row main'>
{React.cloneElement(this.props.center, {
user: this.props.user,
- profiles: this.state.profiles,
team: this.state.team
})}
</div>