mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What? Our current logic of detecting if a route allows dynamic params or not (`fallback`) is flawed, and this PR fixes it. ### Why? Right now, if no `generateStaticParams` is specified we return `fallback: undefined` during dev. However, for an app with multiple params, it may have multiple `generateStaticParams` defined in different levels. If some level isn't covered by any `generateStaticParams`, we still can't determine the fallback value. ### How? I added a naive implementation to check if all params are covered by `generateStaticParams` in the current or inner layers. Closes NEXT-946
8 lines
138 B
JavaScript
8 lines
138 B
JavaScript
export default function Layout({ children }) {
|
|
return children
|
|
}
|
|
|
|
export function generateStaticParams() {
|
|
return [{ slug: 'foo' }]
|
|
}
|