diff --git a/apps/site/components/withBadgeGroup.tsx b/apps/site/components/withBadgeGroup.tsx index 069e762bf48bc..678ab8404bd93 100644 --- a/apps/site/components/withBadgeGroup.tsx +++ b/apps/site/components/withBadgeGroup.tsx @@ -15,6 +15,9 @@ const WithBadgeGroup: FC<{ section: string }> = ({ section }) => { badgeText={badge.title} kind={badge.kind} href={badge.link} + // Ensure that External Links have a target="_blank" and an arrow icon + // indicating that the link is external and should open in a new tab + target={/^https?:/.test(badge.link) ? '_blank' : undefined} > {badge.text} diff --git a/apps/site/pages/en/index.mdx b/apps/site/pages/en/index.mdx index ef36bd8187fed..bb680a0fccb9c 100644 --- a/apps/site/pages/en/index.mdx +++ b/apps/site/pages/en/index.mdx @@ -31,14 +31,14 @@ layout: home {({ release }) => - Node.js LTS + Latest LTS } {({ release }) => - Node.js Current + Latest Release } diff --git a/packages/ui-components/src/Common/BadgeGroup/index.tsx b/packages/ui-components/src/Common/BadgeGroup/index.tsx index dbbadebab464f..809becde96250 100644 --- a/packages/ui-components/src/Common/BadgeGroup/index.tsx +++ b/packages/ui-components/src/Common/BadgeGroup/index.tsx @@ -1,4 +1,4 @@ -import ArrowRightIcon from '@heroicons/react/24/solid/ArrowRightIcon'; +import ArrowUpRightIcon from '@heroicons/react/24/solid/ArrowUpRightIcon'; import type { ComponentProps, FC, PropsWithChildren } from 'react'; import Badge from '#ui/Common/Badge'; @@ -30,7 +30,7 @@ const BadgeGroup: FC> = ({ {children} - {args.href && } + {args.target === '_blank' && } );