-
Notifications
You must be signed in to change notification settings - Fork 26k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strip _rsc query for navigation between app and page (#51195)
Fix a missing case from #50970 When navigating from app to page, the `_rsc` query should still be stripped
- Loading branch information
Showing
5 changed files
with
57 additions
and
5 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
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,18 @@ | ||
import { strict as assert } from 'node:assert' | ||
import Link from 'next/link' | ||
// @ts-ignore | ||
import { NEXT_RSC_UNION_QUERY } from 'next/dist/client/components/app-router-headers' | ||
|
||
export default function Page({ searchParams }) { | ||
assert(searchParams[NEXT_RSC_UNION_QUERY] === undefined) | ||
|
||
return <p>no rsc query page</p> | ||
return ( | ||
<> | ||
<p>no rsc query page</p> | ||
return{' '} | ||
<Link id="link-to-pages" href="/some"> | ||
To /some | ||
</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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Link from 'next/link' | ||
|
||
export default function page() { | ||
return ( | ||
<Link id="link-to-app" href="/assertion/page"> | ||
To /assertion/page | ||
</Link> | ||
) | ||
} |