-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test case for intercepting route + catchall + generateStaticParams (
#75167) This case is fixed on `canary`, but has a regression on 15.1. This PR adds a test case that succeeds on `canary` but fails on the backport branch. A fix for the backport branch is forthcoming.
- Loading branch information
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
test/e2e/app-dir/interception-dynamic-segment/app/@modal/[...catchAll]/page.tsx
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,3 @@ | ||
export default function CatchAll() { | ||
return null | ||
} |
3 changes: 3 additions & 0 deletions
3
...app-dir/interception-dynamic-segment/app/@modal/generate-static-params/(.)[slug]/page.tsx
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,3 @@ | ||
export default function Page() { | ||
return 'intercepted' | ||
} |
19 changes: 19 additions & 0 deletions
19
test/e2e/app-dir/interception-dynamic-segment/app/generate-static-params/[slug]/page.tsx
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,19 @@ | ||
type Props = { | ||
params: Promise<{ slug: string }> | ||
} | ||
|
||
export default async function Page({ params }: Props) { | ||
const { slug } = await params | ||
return <div>Hello {slug}</div> | ||
} | ||
|
||
export function generateStaticParams() { | ||
return [ | ||
{ slug: 'a' }, | ||
{ slug: 'b' }, | ||
{ slug: 'c' }, | ||
{ slug: 'd' }, | ||
{ slug: 'e' }, | ||
{ slug: 'f' }, | ||
] | ||
} |
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