Skip to content

Commit

Permalink
Merge pull request #524 from ensdomains/fix/outlink-externals
Browse files Browse the repository at this point in the history
fix: target _blank for external links
  • Loading branch information
TateB authored Jun 16, 2023
2 parents c8ccd08 + 1e1aa63 commit 3245df3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/@molecules/Hamburger/MainMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ const MainMenu = ({
}
return (
<BaseLink href={route.href} passHref key={route.href}>
<RouteItem>
<RouteItem {...(route.href.startsWith('http') ? { target: '_blank' } : {})}>
<Typography>{t(route.label)}</Typography>
</RouteItem>
</BaseLink>
Expand Down
2 changes: 1 addition & 1 deletion src/components/SocialIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const SocialIcon = ({
href: string
}) => {
return (
<SocialIconWrapper href={href}>
<SocialIconWrapper href={href} target="_blank">
<StyledIcon key={href} $iconColor={color} as={Icon} />
{ColoredIcon && <StyledColoredIcon as={ColoredIcon} />}
</SocialIconWrapper>
Expand Down

0 comments on commit 3245df3

Please sign in to comment.