7664a40064
## Documentation / Examples - [X] Make sure the linting passes by running `pnpm lint` - [X] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples) Co-authored-by: Lee Robinson <9113740+leerob@users.noreply.github.com>
27 lines
568 B
XML
Executable file
27 lines
568 B
XML
Executable file
import type { NextPage } from 'next'
|
|
import Link from 'next/link'
|
|
|
|
const Home: NextPage = () => {
|
|
return (
|
|
<div>
|
|
<h1>Index</h1>
|
|
<p>
|
|
<Link href="/about" passHref>
|
|
<a>Go to about page (will redirect)</a>
|
|
</Link>
|
|
</p>
|
|
<p>
|
|
<Link href="/another" passHref>
|
|
<a>Go to another page (will rewrite)</a>
|
|
</Link>
|
|
</p>
|
|
<p>
|
|
<Link href="/about2" passHref>
|
|
<a>Go to about 2 page (no redirect or rewrite)</a>
|
|
</Link>
|
|
</p>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Home
|