Skip to content

Commit

Permalink
fix: open docs links in the same tab closes #6927 (#6936)
Browse files Browse the repository at this point in the history
* fix: open docs links in the same tab closes #6927

* fix: update link display logic instead of the href
  • Loading branch information
wesleytodd committed Jul 27, 2024
1 parent b74fef4 commit d2f278a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions apps/site/components/Containers/NavBar/NavItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ const NavItem: FC<PropsWithChildren<NavItemProps>> = ({
>
<span className={styles.label}>{children}</span>

{((type === 'nav' && href.startsWith('http')) || target === '_blank') && (
<ArrowUpRightIcon className={styles.icon} />
)}
{target === '_blank' && <ArrowUpRightIcon className={styles.icon} />}
</ActiveLink>
);

Expand Down
3 changes: 1 addition & 2 deletions apps/site/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
},
"docs": {
"link": "https://nodejs.org/docs/latest/api/",
"label": "components.containers.navBar.links.docs",
"target": "_blank"
"label": "components.containers.navBar.links.docs"
},
"certification": {
"link": "https://training.linuxfoundation.org/openjs/",
Expand Down

0 comments on commit d2f278a

Please sign in to comment.