-
-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(create-pages): layouts missing with more nesting #1077
Conversation
Adds tests for layouts with nesting and slugs fixes dai-shi#1055
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
5549e2e
to
31d7ba8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
// /nested/foo is defined as a staticPath of /nested/[id] which matches this layout | ||
await page.goto(`http://localhost:${port}/nested/foo`); | ||
await expect( | ||
page.getByRole('heading', { name: 'Deeply Nested Layout' }), | ||
).toBeVisible(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my bad too, but it's actually not a good idea to rely on examples. This is kind of historical reason, but we now have some standalone spec with fixtures.
Let's revisit it with a different PR later.
path: PathWithoutSlug<Path>; | ||
path: Path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this change, but count on you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
without this change there is a type error if we attempt to define a layout for /foo/[id]
which I think would be valid.
the fs router equivalent would be pages/foo/[id]/_layout.tsx
Adds tests for layouts with nesting and slugs
fixes #1055