Skip to content

Commit

Permalink
set legacyBehavior to true by default
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jan 8, 2024
1 parent 7575ce8 commit 96bbe2d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion examples/material-ui-nextjs-ts-v4-v5-migration/src/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,17 @@ interface NextLinkComposedProps

export const NextLinkComposed = React.forwardRef<HTMLAnchorElement, NextLinkComposedProps>(
function NextLinkComposed(props, ref) {
const { to, linkAs, replace, scroll, shallow, prefetch, locale, ...other } = props;
const {
to,
linkAs,
replace,
scroll,
shallow,
prefetch,
legacyBehavior = true,
locale,
...other
} = props;

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

0 comments on commit 96bbe2d

Please sign in to comment.