2019-10-25 22:56:00 +02:00
|
|
|
import React from 'react'
|
|
|
|
import Link from 'next/link'
|
|
|
|
|
2020-02-27 18:57:39 +01:00
|
|
|
export async function getStaticPaths() {
|
2020-02-27 13:23:28 +01:00
|
|
|
return { paths: [], fallback: true }
|
2019-10-25 22:56:00 +02:00
|
|
|
}
|
|
|
|
|
2020-02-27 18:57:39 +01:00
|
|
|
export async function 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
|
|
|
},
|
2020-04-02 20:29:41 +02:00
|
|
|
unstable_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>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|