From 867dcc48ee09d7b685c44468a2e2d7b65c7d15f9 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 27 Nov 2019 15:49:38 -0330 Subject: [PATCH] Clean up Item JSX (#7584) --- ui/app/components/app/dropdowns/components/menu.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/app/components/app/dropdowns/components/menu.js b/ui/app/components/app/dropdowns/components/menu.js index 9bb919c6d..669a50c63 100644 --- a/ui/app/components/app/dropdowns/components/menu.js +++ b/ui/app/components/app/dropdowns/components/menu.js @@ -38,10 +38,6 @@ function Item (props) { const itemClassName = classnames('menu__item', className, { 'menu__item--clickable': Boolean(onClick), }) - const iconComponent = icon ?
{icon}
: null - const textComponent = text ?
{text}
: null - const subTextComponent = subText ?
{subText}
: null - return children ?
{children}
: ( @@ -49,7 +45,9 @@ function Item (props) { className={itemClassName} onClick={onClick} > - {[ iconComponent, textComponent, subTextComponent ].filter(d => Boolean(d))} + {icon ?
{icon}
: null} + {text ?
{text}
: null} + {subText ?
{subText}
: null} ) }