diff options
author | =Corey Hulen <corey@hulen.com> | 2015-10-06 13:44:52 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-10-06 13:44:52 -0700 |
commit | 378d975eaa53d6c153c44471f03f9b49660cf0b0 (patch) | |
tree | f574d68e70dee5c2e50bd2d625763bd439af1770 /web/react/components | |
parent | fe802fb9c4afdf27a2fb56eb472f48eb921b4de0 (diff) | |
download | chat-378d975eaa53d6c153c44471f03f9b49660cf0b0.tar.gz chat-378d975eaa53d6c153c44471f03f9b49660cf0b0.tar.bz2 chat-378d975eaa53d6c153c44471f03f9b49660cf0b0.zip |
PLT-519 toggle team creation link based on config setting
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/navbar_dropdown.jsx | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index 78057d10b..30c4e94ae 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -135,30 +135,35 @@ export default class NavbarDropdown extends React.Component { var teams = []; - teams.push( - <li - className='divider' - key='div' - > - </li> - ); - if (this.state.teams.length > 1) { + teams.push( + <li + className='divider' + key='div' + > + </li> + ); + this.state.teams.forEach((teamName) => { if (teamName !== this.props.teamName) { teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>); } }); } - teams.push(<li key='newTeam_li'> - <a - key='newTeam_a' - target='_blank' - href={Utils.getWindowLocationOrigin() + '/signup_team'} - > - {'Create a New Team'} - </a> - </li>); + + if (global.window.config.EnableTeamCreation === 'true') { + teams.push( + <li key='newTeam_li'> + <a + key='newTeam_a' + target='_blank' + href={Utils.getWindowLocationOrigin() + '/signup_team'} + > + {'Create a New Team'} + </a> + </li> + ); + } return ( <ul className='nav navbar-nav navbar-right'> |