From d8b75716908364e99a33701b21d0a18cd9f0318e Mon Sep 17 00:00:00 2001 From: Paul Schreiber Date: Tue, 4 Jun 2024 15:20:15 -0400 Subject: [PATCH] fix: only show requirements section when requirements are defined --- src/tool/components/ToolCard.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/tool/components/ToolCard.js b/src/tool/components/ToolCard.js index d22665a82..fa3b643df 100644 --- a/src/tool/components/ToolCard.js +++ b/src/tool/components/ToolCard.js @@ -97,6 +97,7 @@ const ToolCard = ({ tool }) => { const external = t(`tools.${tool}.external`) === 'true'; const LinkComponent = external ? ExternalLink : Link; + const requirements = t(`tools.${tool}.requirements`, ''); return ( @@ -131,8 +132,12 @@ const ToolCard = ({ tool }) => { {toolDescription} )} - {t('tool.requirements')} - {t(`tools.${tool}.requirements`)} + {requirements && ( + <> + {t('tool.requirements')} + {t(`tools.${tool}.requirements`)} + + )} {learnMoreUrl && (