Download next.js/test/integration/amphtml-custom-optimizer/pages/dynamic.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/amphtml-custom-optimizer/pages/dynamic.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/integration/amphtml-custom-optimizer/pages/dynamic.js
-
curl -L -o dynamic.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/integration/amphtml-custom-optimizer/pages/dynamic.js
320 Bytes
| export const config = { | |
| amp: true, | |
| } | |
| const Dynamic = (props) => ( | |
| <amp-img | |
| width="500" | |
| height="500" | |
| layout="responsive" | |
| src={props.src} | |
| ></amp-img> | |
| ) | |
| Dynamic.getInitialProps = () => { | |
| return { | |
| src: 'https://amp.dev/static/samples/img/story_dog2_portrait.jpg', | |
| } | |
| } | |
| export default Dynamic | |