Skip to content

Commit

Permalink
[#220] Opening external links on new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-branco committed Sep 3, 2021
1 parent a0146a3 commit 4f38fa2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/nnk/src/components/core/Link/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const Link = ({

const onClick = event => {
if (link.startsWith('https')) {
window.open(link, '_blank').focus();
event.preventDefault();
return;
}

Expand Down

0 comments on commit 4f38fa2

Please sign in to comment.