react-code-dataset / next.js /test /development /experimental-https-server /app /opengraph-image.tsx
Download next.js/test/development/experimental-https-server/app/opengraph-image.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 675 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/test/development/experimental-https-server/app/opengraph-image.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/test/development/experimental-https-server/app/opengraph-image.tsx
-
curl -L -o opengraph-image.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/next.js/test/development/experimental-https-server/app/opengraph-image.tsx
675 Bytes
| import { ImageResponse } from 'next/og' | |
| export const alt = 'Test OpenGraph Image' | |
| export const size = { | |
| width: 800, | |
| height: 600, | |
| } | |
| export const contentType = 'image/png' | |
| export default async function Image() { | |
| return new ImageResponse( | |
| ( | |
| <div | |
| style={{ | |
| fontSize: 24, | |
| background: 'linear-gradient(90deg, #000 0%, #111 100%)', | |
| color: 'white', | |
| width: '100%', | |
| height: '100%', | |
| display: 'flex', | |
| textAlign: 'center', | |
| alignItems: 'center', | |
| justifyContent: 'center', | |
| }} | |
| > | |
| OpenGraph Test Image | |
| </div> | |
| ), | |
| { | |
| ...size, | |
| } | |
| ) | |
| } | |