From c2fd18a12b0a472904518488809677b795285af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Tue, 18 Jun 2024 16:56:46 +0200 Subject: [PATCH] Simplified logic with default prop values --- packages/frontend/src/components/ArticleBox.tsx | 2 +- packages/frontend/src/components/ExtLink.tsx | 2 +- packages/frontend/src/components/Issue.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/components/ArticleBox.tsx b/packages/frontend/src/components/ArticleBox.tsx index 8c4694a6e..4baa2bd4b 100644 --- a/packages/frontend/src/components/ArticleBox.tsx +++ b/packages/frontend/src/components/ArticleBox.tsx @@ -36,7 +36,7 @@ export const ArticleBox = ({ {description} - {(tags ?? []).map((tag) => ( + {tags.map((tag) => ( {tag} ))} diff --git a/packages/frontend/src/components/ExtLink.tsx b/packages/frontend/src/components/ExtLink.tsx index ae6e8df80..b0cb83a20 100644 --- a/packages/frontend/src/components/ExtLink.tsx +++ b/packages/frontend/src/components/ExtLink.tsx @@ -20,7 +20,7 @@ export const ExtLink = ({ className={className} href={href} title={title} - {...(targetSelf !== true + {...(!targetSelf ? { target: "_blank", rel: "noreferrer noopener", diff --git a/packages/frontend/src/components/Issue.tsx b/packages/frontend/src/components/Issue.tsx index 31e6a7448..8402d2e98 100644 --- a/packages/frontend/src/components/Issue.tsx +++ b/packages/frontend/src/components/Issue.tsx @@ -18,7 +18,7 @@ export const Issue = ({ subtitle={issue.project.name} subtitleDescription={issue.project["short-description"]} subtitleLink={getProjectLink(issue.project)} - tags={hideTags !== true ? issue.project.tags : []} + tags={!hideTags ? issue.project.tags : []} title={issue.title} /> );