Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #706 from matrix-org/luke/fix-team-token-referral-…
Browse files Browse the repository at this point in the history
…link

Make UserSettings use the right teamToken
  • Loading branch information
dbkr committed Feb 16, 2017
2 parents b13e6ca + 406c34b commit 4753552
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/components/structures/LoggedInView.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export default React.createClass({
collapsedRhs={this.props.collapse_rhs}
enableLabs={this.props.config.enableLabs}
referralBaseUrl={this.props.config.referralBaseUrl}
teamToken={this.props.teamToken}
/>;
if (!this.props.collapse_rhs) right_panel = <RightPanel opacity={this.props.sideOpacity}/>;
break;
Expand Down
6 changes: 5 additions & 1 deletion src/components/structures/UserSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ module.exports = React.createClass({

// true if RightPanel is collapsed
collapsedRhs: React.PropTypes.bool,

// Team token for the referral link. If falsy, the referral section will
// not appear
teamToken: React.PropTypes.string,
},

getDefaultProps: function() {
Expand Down Expand Up @@ -462,7 +466,7 @@ module.exports = React.createClass({
},

_renderReferral: function() {
const teamToken = window.localStorage.getItem('mx_team_token');
const teamToken = this.props.teamToken;
if (!teamToken) {
return null;
}
Expand Down

0 comments on commit 4753552

Please sign in to comment.