Download next.js/test/e2e/app-dir/back-forward-cache/app/layout.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 565 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/back-forward-cache/app/layout.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/back-forward-cache/app/layout.tsx
-
curl -L -o layout.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/back-forward-cache/app/layout.tsx
565 Bytes
| import Link from 'next/link' | |
| export default function RootLayout({ | |
| children, | |
| }: { | |
| children: React.ReactNode | |
| }) { | |
| const links = [] | |
| for (let n = 1; n <= 5; n++) { | |
| links.push( | |
| <li key={n}> | |
| <Link href={`/page/${n}`}>Page {n}</Link> | |
| </li> | |
| ) | |
| links.push( | |
| <li key={n + '-with-search-param'}> | |
| <Link href={`/page/${n}?param=true`}>Page {n} (with search param)</Link> | |
| </li> | |
| ) | |
| } | |
| return ( | |
| <html lang="en"> | |
| <body> | |
| <ul>{links}</ul> | |
| <div>{children}</div> | |
| </body> | |
| </html> | |
| ) | |
| } | |