Download next.js/test/e2e/app-dir/app-edge/components/button.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 245 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-edge/components/button.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-edge/components/button.tsx
-
curl -L -o button.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-edge/components/button.tsx
245 Bytes
| 'use client' | |
| import { useRouter } from 'next/navigation' | |
| import React from 'react' | |
| export default function Button() { | |
| const router = useRouter() | |
| const onClick = () => router.push('/') | |
| return <button onClick={onClick}>My Button</button> | |
| } | |