Skip to content

Commit 6f489c8

Browse files
authored
Merge pull request #81 from Xahau/fix-social-links
Fix to open inner link in social links (not new tab)
2 parents a2d3ef2 + af06612 commit 6f489c8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/components/Header.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export default function Header(props) {
143143
<a
144144
key={item.name}
145145
href={item.href}
146-
target="_blank"
146+
target={item.href.startsWith('http') ? '_blank' : undefined}
147147
className="no-underline block font-regular text-white"
148148
>
149149
<div
@@ -298,7 +298,9 @@ export default function Header(props) {
298298
key={item.name}
299299
as="a"
300300
href={item.href}
301-
target="_blank"
301+
target={
302+
item.href.startsWith('http') ? '_blank' : undefined
303+
}
302304
className="no-underline block rounded-lg py-2 pr-3 pl-6 text-sm/7 font-regular text-black hover:bg-gray-50"
303305
>
304306
{item.name}

0 commit comments

Comments
 (0)