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

export default function Page(props) {
  return (
    <>
      <p>hello from ssg</p>
      <p id="query">{JSON.stringify(useRouter().query)}</p>
    </>
  )
}

export function getStaticProps() {
  if (!process.env.LEGACY_ENV_KEY) {
    throw new Error('missing env key LEGACY_ENV_KEY!!')
  }
  return {
    props: {},
  }
}