mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Ensures query isn't omitted when using experimental compile mode with SSG pages as it skips the isReady delay that is normally done with prerendering.
17 lines
267 B
JavaScript
17 lines
267 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
export default function Page(props) {
|
|
return (
|
|
<>
|
|
<p>hello from ssg</p>
|
|
<p id="query">{JSON.stringify(useRouter().query)}</p>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export function getStaticProps() {
|
|
return {
|
|
props: {},
|
|
}
|
|
}
|