Download next.js/test/production/prerender-prefetch/app/pages/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 523 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/prerender-prefetch/app/pages/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/prerender-prefetch/app/pages/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/prerender-prefetch/app/pages/index.js
523 Bytes
| import Link from 'next/link' | |
| export default function Page(props) { | |
| return ( | |
| <> | |
| <p id="page">index</p> | |
| <p id="props">{JSON.stringify(props)}</p> | |
| <Link href="/blog/first" id="to-blog-first"> | |
| /blog/first | |
| </Link> | |
| <br /> | |
| <Link href="/blog/second" id="to-blog-second"> | |
| /blog/second | |
| </Link> | |
| <br /> | |
| </> | |
| ) | |
| } | |
| export function getStaticProps() { | |
| console.log('revalidating /') | |
| return { | |
| props: { | |
| now: Date.now(), | |
| }, | |
| revalidate: 1, | |
| } | |
| } | |