Skip to content

Commit

Permalink
[docs] Fix missing href for AppDrawerNavItems (#27936)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Aug 24, 2021
1 parent 6207e10 commit 6ea1867
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 14 deletions.
3 changes: 1 addition & 2 deletions docs/src/components/productDesignKit/DesignKitDemo.tsx
Expand Up @@ -65,7 +65,7 @@ export default function TemplateDemo() {
/>
</Highlighter>
))}
<More component={Link} href={ROUTES.storeDesign} passHref noLinkStyle />
<More component={Link} href={ROUTES.storeDesign} noLinkStyle />
</Group>
</Grid>
<Grid item xs={12} md={6}>
Expand Down Expand Up @@ -177,7 +177,6 @@ export default function TemplateDemo() {
</Box>
<Button
component={Link}
passHref
noLinkStyle
href={ROUTES.storeDesign}
endIcon={<LaunchRounded sx={{ '&&': { fontSize: 16 } }} />}
Expand Down
8 changes: 3 additions & 5 deletions docs/src/components/productDesignKit/DesignKitFAQ.tsx
Expand Up @@ -29,11 +29,9 @@ const faqData = [
detail: (
<React.Fragment>
We&apos;ll send you an email when a new release is available. You can access the item on the{' '}
<InternalLink href="/store/account/download" passHref>
download
</InternalLink>{' '}
page of your store account. You can find a detailed description of the changes under the
&quot;Changelog&quot; tab on this page.
<InternalLink href="/store/account/download">download</InternalLink> page of your store
account. You can find a detailed description of the changes under the &quot;Changelog&quot;
tab on this page.
</React.Fragment>
),
},
Expand Down
1 change: 0 additions & 1 deletion docs/src/components/productDesignKit/DesignKitHero.tsx
Expand Up @@ -43,7 +43,6 @@ export default function TemplateHero() {
</Typography>
<Button
component={Link}
passHref
noLinkStyle
href={ROUTES.storeDesign}
size="large"
Expand Down
1 change: 0 additions & 1 deletion docs/src/components/productTemplate/TemplateHero.tsx
Expand Up @@ -42,7 +42,6 @@ export default function TemplateHero() {
</Typography>
<Button
component={Link}
passHref
noLinkStyle
href={ROUTES.storePopular}
size="large"
Expand Down
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>(
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

0 comments on commit 6ea1867

Please sign in to comment.