rsnext/test/integration/trailing-slashes-href-resolving/pages/index.js
Tim Neutkens f260328900
BREAKING CHANGE: Enable newNextLinkBehavior (#41459)
- Enable newNextLinkBehavior. See #36436 
- Run next/link codemod on test suite

Note that from when this lands on apps trying canary will need to run
the new-link codemod in order to upgrade.
Ideally we have to detect `<a>` while rendering the new link and warn
for it.

Co-authored-by: Steven <steven@ceriously.com>
2022-10-17 21:20:28 -04:00

36 lines
869 B
JavaScript

import Link from 'next/link'
export default function Index() {
return (
<>
<Link href="/blog/another/" id="to-blog-another">
to /blog/another/
</Link>
<br />
<Link href="/blog/first-post/" id="to-blog-post">
to /blog/first-post/
</Link>
<br />
<Link href="/catch-all/hello/world/" id="to-catch-all-item">
to /catch-all/hello/world/
</Link>
<br />
<Link href="/catch-all/first/" id="to-catch-all-first">
to /catch-all/first/
</Link>
<br />
<Link href="/another/" id="to-another">
to /another/
</Link>
<br />
<Link href="/top-level-slug/" id="to-slug">
to /top-level-slug/
</Link>
<br />
<Link as="/world" href="/[slug]" id="to-slug-manual">
to /world/
</Link>
<br />
</>
)
}