2019-10-25 22:56:00 +02:00
|
|
|
import React from 'react'
|
|
|
|
import Link from 'next/link'
|
|
|
|
|
|
|
|
// eslint-disable-next-line camelcase
|
2019-11-28 04:46:16 +01:00
|
|
|
export async function unstable_getStaticPaths() {
|
2020-02-08 04:09:54 +01:00
|
|
|
return { paths: [] }
|
2019-10-25 22:56:00 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// eslint-disable-next-line camelcase
|
2019-11-11 04:24:53 +01:00
|
|
|
export async function unstable_getStaticProps({ params }) {
|
2019-10-25 22:56:00 +02:00
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
user: params.user,
|
2019-11-11 04:24:53 +01:00
|
|
|
time: (await import('perf_hooks')).performance.now(),
|
2019-10-25 22:56:00 +02:00
|
|
|
},
|
2019-11-11 04:24:53 +01:00
|
|
|
revalidate: 10,
|
2019-10-25 22:56:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ({ user, time }) => {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<p>User: {user}</p>
|
|
|
|
<span>time: {time}</span>
|
2019-11-11 04:24:53 +01:00
|
|
|
<Link href="/">
|
|
|
|
<a id="home">to home</a>
|
2019-10-25 22:56:00 +02:00
|
|
|
</Link>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|