Download next.js/test/e2e/app-dir/app-prefetch/app/dashboard/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-prefetch/app/dashboard/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-prefetch/app/dashboard/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-prefetch/app/dashboard/page.js
461 Bytes
| import Link from 'next/link' | |
| export const revalidate = 0 | |
| async function getData() { | |
| await new Promise((resolve) => setTimeout(resolve, 3000)) | |
| return { | |
| message: 'Welcome to the dashboard', | |
| } | |
| } | |
| export default async function DashboardPage(props) { | |
| const { message } = await getData() | |
| return ( | |
| <> | |
| <p id="dashboard-page">{message}</p> | |
| <Link href="/static-page" id="to-static-page"> | |
| To Static Page | |
| </Link> | |
| </> | |
| ) | |
| } | |