From fe6922d8fb5c3900c2294160c0838805c5f133ed Mon Sep 17 00:00:00 2001 From: Franc Camps-Febrer Date: Thu, 6 Dec 2018 12:32:13 +0000 Subject: [PATCH] Render tag panel only if tags exist --- src/components/Toolbar.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index 20a888c..8a4098d 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -106,13 +106,15 @@ class Toolbar extends React.Component { renderToolbarTabs() { const title = copy[this.props.language].toolbar.title; + const isTags = this.props.tags && (this.props.tags.children > 0); + return (

{title}

{/*this.renderToolbarTab(0, 'search')*/} - {this.renderToolbarTab(0, 'Focus stories')} - {this.renderToolbarTab(1, 'Explore freely')} + {this.renderToolbarTab(0, 'Narratives')} + {(isTags) ? this.renderToolbarTab(1, 'Explore by tag') : ''}