Download next.js/test/e2e/i18n-data-route/components/page.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 317 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/i18n-data-route/components/page.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/i18n-data-route/components/page.tsx
-
curl -L -o page.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/i18n-data-route/components/page.tsx
317 Bytes
| import React from 'react' | |
| export function Page({ page }) { | |
| return <p data-page={page}>{page}</p> | |
| } | |
| export function createGetServerSideProps(page: string) { | |
| return async function getServerSideProps(ctx) { | |
| const output = ctx.req.headers['x-invoke-output'] ?? null | |
| return { props: { page, output } } | |
| } | |
| } | |