Download next.js/test/development/app-dir/segment-explorer/app/boundary/page.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/segment-explorer/app/boundary/page.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/app-dir/segment-explorer/app/boundary/page.tsx
-
curl -L -o page.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/segment-explorer/app/boundary/page.tsx
473 Bytes
| import { forbidden, notFound, unauthorized } from 'next/navigation' | |
| export default async function Page({ | |
| searchParams, | |
| }: { | |
| searchParams: Promise<{ [key: string]: string }> | |
| }) { | |
| const search = await searchParams | |
| switch (search.name) { | |
| case 'not-found': | |
| return notFound() | |
| case 'forbidden': | |
| return forbidden() | |
| case 'unauthorized': | |
| return unauthorized() | |
| default: | |
| break | |
| } | |
| return <p>{'Visit /boundary?name=<boundary>'}</p> | |
| } | |