rsnext/test/integration/prerender/pages/something.js
JJ Kasper 97a6b64f83
Rename unstable GSP field (#11602)
* Rename unstable GSP revalidate field

* Update error message

* Tweak error message some more

* Apply suggestions from code review

Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>

Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-04-02 14:29:41 -04:00

34 lines
796 B
JavaScript

import React from 'react'
import Link from 'next/link'
import { useRouter } from 'next/router'
export async function getStaticProps({ params }) {
return {
props: {
world: 'world',
params: params || {},
time: new Date().getTime(),
random: Math.random(),
},
unstable_revalidate: false,
}
}
export default ({ world, time, params, random }) => {
return (
<>
<p>hello: {world}</p>
<span>time: {time}</span>
<div id="random">{random}</div>
<div id="params">{JSON.stringify(params)}</div>
<div id="query">{JSON.stringify(useRouter().query)}</div>
<Link href="/">
<a id="home">to home</a>
</Link>
<br />
<Link href="/another">
<a id="another">to another</a>
</Link>
</>
)
}