Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix missing href for AppDrawerNavItems #27936

Merged
merged 2 commits into from Aug 24, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions docs/src/modules/components/Link.tsx
Expand Up @@ -8,18 +8,17 @@ import { useUserLanguage } from 'docs/src/modules/utils/i18n';

interface NextLinkComposedProps
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'href'>,
Omit<NextLinkProps, 'href' | 'as'> {
Omit<NextLinkProps, 'href' | 'as' | 'passHref'> {
to: NextLinkProps['href'];
linkAs?: NextLinkProps['as'];
href?: NextLinkProps['href'];
}

const Anchor = styled('a')({ cursor: 'pointer' });

export const NextLinkComposed = React.forwardRef<HTMLAnchorElement, NextLinkComposedProps>(
const NextLinkComposed = React.forwardRef<HTMLAnchorElement, NextLinkComposedProps>(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never used so don't export it.

function NextLinkComposed(props, ref) {
const { to, linkAs, href, replace, scroll, passHref, shallow, prefetch, locale, ...other } =
props;
const { to, linkAs, href, replace, scroll, shallow, prefetch, locale, ...other } = props;

return (
<NextLink
Expand All @@ -29,7 +28,7 @@ export const NextLinkComposed = React.forwardRef<HTMLAnchorElement, NextLinkComp
replace={replace}
scroll={scroll}
shallow={shallow}
passHref={passHref}
passHref
locale={locale}
>
<Anchor ref={ref} {...other} />
Expand Down