File size: 375 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
import { useAmp } from 'next/amp'

export const config = {
  amp: true,
}

export const getStaticProps = () => {
  return {
    props: {
      hello: 'hello',
      random: Math.random(),
    },
  }
}

export default ({ hello, random }) => (
  <>
    <p id="use-amp">useAmp: {useAmp() ? 'yes' : 'no'}</p>
    <p id="hello">{hello}</p>
    <p id="random">{random}</p>
  </>
)