From 378d975eaa53d6c153c44471f03f9b49660cf0b0 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 6 Oct 2015 13:44:52 -0700 Subject: PLT-519 toggle team creation link based on config setting --- web/react/components/navbar_dropdown.jsx | 39 ++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 17 deletions(-) (limited to 'web/react') 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( -
  • -
  • - ); - if (this.state.teams.length > 1) { + teams.push( +
  • +
  • + ); + this.state.teams.forEach((teamName) => { if (teamName !== this.props.teamName) { teams.push(
  • {'Switch to ' + teamName}
  • ); } }); } - teams.push(
  • - - {'Create a New Team'} - -
  • ); + + if (global.window.config.EnableTeamCreation === 'true') { + teams.push( +
  • + + {'Create a New Team'} + +
  • + ); + } return (