mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 20:46:58 +02:00
fix(v2): fix error with required href attr of link in mobiles (#3607)
This commit is contained in:
parent
6cfadb89eb
commit
e5448d9a96
2 changed files with 3 additions and 1 deletions
|
@ -184,6 +184,7 @@ function NavItemMobile({
|
||||||
'menu__list-item--collapsed': collapsed,
|
'menu__list-item--collapsed': collapsed,
|
||||||
})}>
|
})}>
|
||||||
<NavLink
|
<NavLink
|
||||||
|
role="button"
|
||||||
className={navLinkClassNames(className, true)}
|
className={navLinkClassNames(className, true)}
|
||||||
{...props}
|
{...props}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
|
@ -146,7 +146,8 @@ function Link({
|
||||||
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
||||||
<a
|
<a
|
||||||
href={targetLink}
|
href={targetLink}
|
||||||
{...(!isInternal && {target: '_blank', rel: 'noopener noreferrer'})}
|
{...(targetLinkUnprefixed &&
|
||||||
|
!isInternal && {target: '_blank', rel: 'noopener noreferrer'})}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue