Download next.js/test/production/export/pages/about.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 437 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/export/pages/about.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/production/export/pages/about.js
-
curl -L -o about.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/production/export/pages/about.js
437 Bytes
| import Link from 'next/link' | |
| import getConfig from 'next/config' | |
| const { publicRuntimeConfig, serverRuntimeConfig } = getConfig() | |
| const About = ({ bar }) => ( | |
| <div id="about-page"> | |
| <div> | |
| <Link href="/">Go Back</Link> | |
| </div> | |
| <p>{`This is the About page ${publicRuntimeConfig.foo}${bar || ''}`}</p> | |
| </div> | |
| ) | |
| About.getInitialProps = async (ctx) => { | |
| return { bar: serverRuntimeConfig.bar } | |
| } | |
| export default About | |