mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This fixes dynamic pages with `fallback: false` that don't have a matching path causing a 404 before rewrites are checked unexpectedly. This ensures we treat `fallback: false` pages as a match only if they also have a matching static path so that fallback rewrites can be triggered correctly. An additional test suite as been added to ensure this is working as expected. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added
17 lines
275 B
JavaScript
17 lines
275 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
export const getServerSideProps = () => {
|
|
return {
|
|
props: {},
|
|
}
|
|
}
|
|
|
|
export default function Page() {
|
|
return (
|
|
<>
|
|
<p id="another">another</p>
|
|
<p id="query">{JSON.stringify(useRouter().query)}</p>
|
|
</>
|
|
)
|
|
}
|