Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
7e055dd
commit b044f42
Showing
4 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
test/integration/react-streaming-and-server-components/app/pages/next-api/link.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import NextLink from 'next/link' | ||
import Link from 'next/link' | ||
|
||
export default function Link() { | ||
export default function LinkPage({ router }) { | ||
const { query } = router | ||
const id = parseInt(query.id || '0', 10) | ||
return ( | ||
<NextLink href={`/`}> | ||
<a>go home</a> | ||
</NextLink> | ||
<> | ||
<h3 id="query">query:{id}</h3> | ||
<Link href={`/next-api/link?id=${id + 1}`}> | ||
<a id="next_id">next id</a> | ||
</Link> | ||
<Link href={`/`}> | ||
<a>go home</a> | ||
</Link> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters