mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
* Update server-only changes HMR handling * Add failing tests for GS(S)P server only changes * update test * normalize backslashes * Update to xor the chunk hashes * remove test change * remove other test change
28 lines
445 B
JavaScript
28 lines
445 B
JavaScript
import { useRouter } from 'next/router'
|
|
import data from '../lib/data.json'
|
|
|
|
export default function Gsp(props) {
|
|
if (useRouter().isFallback) {
|
|
return 'Loading...'
|
|
}
|
|
|
|
return (
|
|
<>
|
|
<p id="change">change me</p>
|
|
<p id="props">{JSON.stringify(props)}</p>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export const getStaticProps = async () => {
|
|
const count = 1
|
|
|
|
return {
|
|
props: {
|
|
count,
|
|
data,
|
|
random: Math.random(),
|
|
},
|
|
}
|
|
}
|