Fix select handler for main tab bar handled a click on the add server button (and failed)

This commit is contained in:
Jonas Schwabe
2017-03-15 20:22:21 +01:00
parent a8effb0084
commit eb76688009
2 changed files with 5 additions and 0 deletions

View File

@@ -142,6 +142,9 @@ const MainPage = React.createClass({
} }
}, },
handleSelect(key) { handleSelect(key) {
if (key === 'addServerButton') {
return;
}
const newKey = (this.props.teams.length + key) % this.props.teams.length; const newKey = (this.props.teams.length + key) % this.props.teams.length;
this.setState({ this.setState({
key: newKey key: newKey

View File

@@ -98,6 +98,8 @@ class TabBar extends React.Component {
return ( return (
<NavItem <NavItem
className='buttonTab' className='buttonTab'
key='addServerButton'
eventKey='addServerButton'
> >
<Button <Button
id='tabBarAddNewTeam' id='tabBarAddNewTeam'