Download next.js/test/e2e/app-dir/app/pages/ssg.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app/pages/ssg.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app/pages/ssg.js
-
curl -L -o ssg.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app/pages/ssg.js
364 Bytes
| 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: {}, | |
| } | |
| } | |