97a6b64f83
* 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>
24 lines
474 B
JavaScript
24 lines
474 B
JavaScript
import React from 'react'
|
|
import Link from 'next/link'
|
|
|
|
export async function getStaticProps() {
|
|
return {
|
|
props: {
|
|
slugs: ['post-1', 'post-2'],
|
|
time: (await import('perf_hooks')).performance.now(),
|
|
},
|
|
unstable_revalidate: 10,
|
|
}
|
|
}
|
|
|
|
export default ({ slugs, time }) => {
|
|
return (
|
|
<>
|
|
<p>Posts: {JSON.stringify(slugs)}</p>
|
|
<span>time: {time}</span>
|
|
<Link href="/">
|
|
<a id="home">to home</a>
|
|
</Link>
|
|
</>
|
|
)
|
|
}
|