Skip to content

Commit e847db8

Browse files
committed
eat(nav): open external links in a new browser tab
1 parent 9cc749a commit e847db8

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/components/navigation.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ const NavbarItem: React.FunctionComponent<{ item; idx }> = ({ item, idx }) => {
4343
key={idx}
4444
className={`${styles["nav-icon"]}`}
4545
title={item.title}
46+
{...(item.external
47+
? { target: "_blank", rel: "noopener noreferrer" }
48+
: {})}
4649
dangerouslySetInnerHTML={{ __html: item.content }}></Link>
4750
);
4851
};

0 commit comments

Comments
 (0)