Download next.js/test/integration/amphtml-ssg/pages/hybrid.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/amphtml-ssg/pages/hybrid.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/amphtml-ssg/pages/hybrid.js
-
curl -L -o hybrid.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/amphtml-ssg/pages/hybrid.js
379 Bytes
| import { useAmp } from 'next/amp' | |
| export const config = { | |
| amp: 'hybrid', | |
| } | |
| 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> | |
| </> | |
| ) | |