Download next.js/test/development/error-overlay/app/known-client-error/page.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 445 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/error-overlay/app/known-client-error/page.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/error-overlay/app/known-client-error/page.tsx
-
curl -L -o page.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/error-overlay/app/known-client-error/page.tsx
445 Bytes
| 'use client' | |
| import Link from 'next/link' | |
| import React from 'react' | |
| export default function Page() { | |
| const broken = ( | |
| <> | |
| <Link href="/invalid" as="mailto:john@example.com"> | |
| <a>Invalid link</a> | |
| </Link> | |
| </> | |
| ) | |
| const [shouldShow, setShouldShow] = React.useState(false) | |
| return ( | |
| <div> | |
| <button onClick={() => setShouldShow(true)}>break on client</button> | |
| {shouldShow && broken} | |
| </div> | |
| ) | |
| } | |