From 850e5633620151f768e73e17d827855ce6c3adfd Mon Sep 17 00:00:00 2001 From: Tomas Bures Date: Fri, 11 Aug 2017 18:22:22 +0200 Subject: [PATCH] Secondary nav is shown only if there are 2 or more items. --- client/src/lib/page.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/lib/page.js b/client/src/lib/page.js index 5b069c68..ac852717 100644 --- a/client/src/lib/page.js +++ b/client/src/lib/page.js @@ -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 ; + return ; + } } } @@ -214,8 +216,6 @@ class RouteContent extends Component { component = React.createElement(route.component, compProps, null); } - - return (