Skip to content

Commit

Permalink
Prevent integration page internal links to open new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Breno committed Nov 1, 2024
1 parent ad80b4d commit 349c417
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Advantages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type AdvantagesProps = {
link?: {
title: string;
href: string;
openNewTab?: boolean;
};
isDarkTheme?: boolean;
isImageOnTheLeft?: boolean;
Expand Down Expand Up @@ -60,7 +61,10 @@ const Advantages = ({
) : null}
{link ? (
<ButtonWrapper>
<OutboundLinkFilled href={link.href} target="_blank">
<OutboundLinkFilled
href={link.href}
target={link.openNewTab ? '_blank' : undefined}
>
{link.title}
</OutboundLinkFilled>
</ButtonWrapper>
Expand Down

0 comments on commit 349c417

Please sign in to comment.