Skip to content

Commit

Permalink
Fix external links in Global Header
Browse files Browse the repository at this point in the history
  • Loading branch information
icaraps committed Sep 22, 2020
1 parent 8b2eb62 commit c964281
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ const GlobalHeader = ({ globalNav, versions, pages, docs, location }) => {
padding-top: var(--spectrum-global-dimension-size-100);
padding-bottom: var(--spectrum-global-dimension-size-100);
`}
href={page.path}>
href={page.path}
{...getExternalLinkProps(page.path)}>
<Flex direction="column">
<View>{page.title}</View>
{page.description && (
Expand Down Expand Up @@ -267,7 +268,9 @@ const GlobalHeader = ({ globalNav, versions, pages, docs, location }) => {
{menu.sections[0].viewAll && (
<View marginTop="size-100" marginStart="size-200">
<Link isQuiet={true}>
<a href={menu.sections[0].viewAll.path}>
<a
href={menu.sections[0].viewAll.path}
{...getExternalLinkProps(menu.sections[0].viewAll.path)}>
<strong>{menu.sections[0].viewAll.title}</strong>
</a>
</Link>
Expand Down Expand Up @@ -348,7 +351,7 @@ const GlobalHeader = ({ globalNav, versions, pages, docs, location }) => {
/>
<View marginStart="size-400">
{docs && (
<Button variant="primary" elementType="a" href={docs.path}>
<Button variant="primary" elementType="a" href={docs.path} {...getExternalLinkProps(docs.path)}>
View Docs
</Button>
)}
Expand Down

0 comments on commit c964281

Please sign in to comment.