Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit d9ecbbc

Browse files
committed
Handle external links differently
1 parent f54fe44 commit d9ecbbc

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/Menu.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ const Menu = props => {
1010
<ul>
1111
{menuLinks.map(link => (
1212
<li key={link.name}>
13-
{/* <Link to={link.link}>{link.name}</Link> */}
14-
<a href={link.link}>{link.name}</a>
13+
{link.external ? (
14+
<a href={link.link} target="_blank" rel="noopener noreferrer">
15+
{link.name}
16+
</a>
17+
) : (
18+
<Link to={link.link}>{link.name}</Link>
19+
)}
1520
</li>
1621
))}
1722
{socialChannels.map(socialChannel => (
@@ -39,6 +44,7 @@ export default props => (
3944
menuLinks {
4045
name
4146
link
47+
external
4248
}
4349
}
4450
}

0 commit comments

Comments
 (0)