Files
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 <[email protected]>
2022-10-17 21:20:28 -04:00

39 lines
898 B
JavaScript

import Link from 'next/link'
const links = [
{ href: 'https://github.com/vercel/next.js', label: 'GitHub' },
{ href: 'https://nextjs.org/docs', label: 'Docs' },
]
function Nav() {
return (
<nav>
<ul className="flex justify-between items-center p-8">
<li>
<Link href="/" className="text-blue-500 no-underline">
Home
</Link>
</li>
<ul className="flex justify-between items-center">
{links.map(({ href, label }) => (
<li key={`${href}${label}`} className="ml-4">
<a href={href} className="btn-blue no-underline">
{label}
</a>
</li>
))}
</ul>
</ul>
</nav>
)
}
export default () => (
<div>
<Nav />
<div className="hero">
<h1 className="title">Next.js + Tailwind CSS + PurgeCSS</h1>
</div>
</div>
)