PLT-44 allow team switching without the need to login

Этот коммит содержится в:
=Corey Hulen
2015-10-01 17:52:47 -07:00
родитель 013df9f661
Коммит 430806301d
9 изменённых файлов: 109 добавлений и 15 удалений

Просмотреть файл

@@ -142,10 +142,10 @@ export default class NavbarDropdown extends React.Component {
>
</li>
);
if (this.state.teams.length > 1 && this.state.currentTeam) {
var curTeamName = this.state.currentTeam.name;
if (this.state.teams.length > 1) {
this.state.teams.forEach((teamName) => {
if (teamName !== curTeamName) {
if (teamName !== this.props.teamName) {
teams.push(<li key={teamName}><a href={Utils.getWindowLocationOrigin() + '/' + teamName}>{'Switch to ' + teamName}</a></li>);
}
});
@@ -234,5 +234,7 @@ NavbarDropdown.defaultProps = {
teamType: ''
};
NavbarDropdown.propTypes = {
teamType: React.PropTypes.string
teamType: React.PropTypes.string,
teamDisplayName: React.PropTypes.string,
teamName: React.PropTypes.string
};