rsnext/test/integration/prerender-no-revalidate/pages/named.js
2020-03-11 09:33:55 -05:00

27 lines
432 B
JavaScript

let runs = 0
export async function getStaticProps() {
if (runs++) {
throw new Error('GSP was re-run.')
}
return {
props: {
world: 'world',
time: new Date().getTime(),
other: Math.random(),
},
}
}
const Page = ({ world, time, other }) => {
return (
<div>
<p>hello {world}</p>
<span>time: {time}</span>
<span>other: {other}</span>
</div>
)
}
export default Page