Download next.js/test/e2e/basepath/pages/external-and-back.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 243 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/basepath/pages/external-and-back.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/basepath/pages/external-and-back.js
-
curl -L -o external-and-back.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/basepath/pages/external-and-back.js
243 Bytes
| const Page = ({ from }) => ( | |
| <div> | |
| <p>{from}</p> | |
| <a href="https://google.com">External link</a> | |
| </div> | |
| ) | |
| Page.getInitialProps = () => { | |
| return { from: typeof window === 'undefined' ? 'server' : 'client' } | |
| } | |
| export default Page | |