Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target _blank on external links for improve user experience #887

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

iamdevmarcos
Copy link

Added target _blank on external links for improve user experience and accesibility.
This way the user will not leave the website after clicking on a social media link, thus improving their experience.

@vercel
Copy link

vercel bot commented Jan 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
styled-components ✅ Ready (Inspect) Visit Preview Jan 3, 2023 at 10:39AM (UTC)

@@ -46,9 +46,14 @@ const Link = ({ ['aria-label']: ariaLabel, children, className, inline, unstyled
dataAttrs = { 'data-white': white };
}

let target;
if (isExternal) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if instead of an explicit isExternal flag we just looked at href and determined if it's a relative path or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants