File size: 390 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { useRouter } from 'next/router'

export default function Page(props) {
  const router = useRouter()
  return (
    <>
      <p>getStaticProps router.isReady</p>
      <p id="query">{JSON.stringify(router.query)}</p>
      <p id="ready">{router.isReady ? 'yes' : 'no'}</p>
    </>
  )
}

export function getStaticProps() {
  return {
    props: {
      now: Date.now(),
    },
  }
}