From 44375d150bf30b2445749bab11026d22fbf52bcc Mon Sep 17 00:00:00 2001 From: Jamiu Okanlawon Date: Thu, 17 Apr 2025 17:55:15 +0100 Subject: [PATCH] fix: Prevent non-external links from opening in new tab --- website/src/components/Anchors.tsx | 2 +- website/src/components/mdx/Card.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/components/Anchors.tsx b/website/src/components/Anchors.tsx index ebdef732..32e93d89 100644 --- a/website/src/components/Anchors.tsx +++ b/website/src/components/Anchors.tsx @@ -31,7 +31,7 @@ export function Anchors() {
  • diff --git a/website/src/components/mdx/Card.tsx b/website/src/components/mdx/Card.tsx index f3f197c8..5822c603 100644 --- a/website/src/components/mdx/Card.tsx +++ b/website/src/components/mdx/Card.tsx @@ -54,7 +54,7 @@ export function Card({ href, icon, title, children, ...props }: CardProps) { className="group block no-underline" href={_href} rel="noopener noreferrer" - target={isExternalLink(_href) ? "_blank" : undefined} + target={isExternalLink(_href) ? "_blank" : ""} > {card}