File size: 510 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { useRouter } from 'next/router'

export default function Gsp(props) {
  if (useRouter().isFallback) {
    return 'Loading...'
  }

  return (
    <>
      <p id="change">change me</p>
      <p id="props">{JSON.stringify(props)}</p>
      <div style={{ height: 1000, width: 50, background: 'cyan' }}></div>
      <p id="scroll-target">bottom</p>
    </>
  )
}

export const getStaticProps = async () => {
  const count = 1

  return {
    props: {
      count,
      random: Math.random(),
    },
  }
}