Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename query to searchParams for getServerSideProps in new Router (#3…
- Loading branch information
1 parent
3430ac1
commit f05cee2
Showing
5 changed files
with
66 additions
and
33 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
10 changes: 7 additions & 3 deletions
10
test/e2e/app-dir/app/app/param-and-query/[slug]/page.client.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,7 +1,11 @@ | ||
export default function Page({ params, query }) { | ||
export default function Page({ params, searchParams }) { | ||
return ( | ||
<h1 id="params-and-query" data-params={params.slug} data-query={query.slug}> | ||
hello from /param-and-query/{params.slug}?slug={query.slug} | ||
<h1 | ||
id="params-and-query" | ||
data-params={params.slug} | ||
data-query={searchParams.slug} | ||
> | ||
hello from /param-and-query/{params.slug}?slug={searchParams.slug} | ||
</h1> | ||
) | ||
} |
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