Secondary nav is shown only if there are 2 or more items.

This commit is contained in:
Tomas Bures 2017-08-11 18:22:22 +02:00
parent 602364caae
commit 850e563362

View file

@ -132,12 +132,14 @@ class SecondaryNavBar extends Component {
}
}
let className = 'mt-secondary-nav nav nav-pills';
if (this.props.className) {
className += ' ' + this.props.className;
}
if (renderedElems.length > 1) {
let className = 'mt-secondary-nav nav nav-pills';
if (this.props.className) {
className += ' ' + this.props.className;
}
return <ul className={className}>{renderedElems}</ul>;
return <ul className={className}>{renderedElems}</ul>;
}
}
}
@ -214,8 +216,6 @@ class RouteContent extends Component {
component = React.createElement(route.component, compProps, null);
}
return (
<div>
<div>