From 1f49eec435db38f802827509e0c8ae8b93ffdb3a Mon Sep 17 00:00:00 2001 From: Can Temizyurek <101304677+cantemizyurek@users.noreply.github.com> Date: Tue, 22 Oct 2024 22:07:55 -0400 Subject: [PATCH 1/2] Fix table.js containing TS code --- .../03-rendering/04-partial-prerendering.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx b/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx index 2e51f677cb32e..8fc5c8328b79d 100644 --- a/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx +++ b/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx @@ -235,9 +235,7 @@ export async function Table({ ``` ```jsx filename="app/table.js" switcher -export async function Table({ searchParams }: { - searchParams: Promise<{ sort: string }> -}) { +export async function Table({ searchParams }) { const sort = (await searchParams).sort === 'true'; return '...' } From 0797baf0b5a4d41fcef9235ba2f9224c016b1423 Mon Sep 17 00:00:00 2001 From: Zack Tanner <1939140+ztanner@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:24:51 -0700 Subject: [PATCH 2/2] lint --- .../03-rendering/04-partial-prerendering.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx b/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx index 8fc5c8328b79d..b56fc8013b2cc 100644 --- a/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx +++ b/docs/02-app/01-building-your-application/03-rendering/04-partial-prerendering.mdx @@ -236,7 +236,7 @@ export async function Table({ ```jsx filename="app/table.js" switcher export async function Table({ searchParams }) { - const sort = (await searchParams).sort === 'true'; + const sort = (await searchParams).sort === 'true' return '...' } ```