Skip to content

Commit

Permalink
fix: only show requirements section when requirements are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Jun 4, 2024
1 parent ba87b07 commit 0304d50
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tool/components/ToolCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<React.Fragment>
Expand Down Expand Up @@ -131,8 +132,12 @@ const ToolCard = ({ tool }) => {
<Typography>{toolDescription}</Typography>
)}

<Typography variant="h3">{t('tool.requirements')}</Typography>
<Typography>{t(`tools.${tool}.requirements`)}</Typography>
{requirements && (
<>
<Typography variant="h3">{t('tool.requirements')}</Typography>
<Typography>{t(`tools.${tool}.requirements`)}</Typography>
</>
)}

{learnMoreUrl && (
<Typography sx={{ mt: '1em' }}>
Expand Down

0 comments on commit 0304d50

Please sign in to comment.