Download next.js/test/e2e/app-dir/app-basepath/components/read-pathname.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 207 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-basepath/components/read-pathname.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-basepath/components/read-pathname.js
-
curl -L -o read-pathname.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-basepath/components/read-pathname.js
207 Bytes
| import { usePathname } from 'next/navigation' | |
| export function ReadPathname() { | |
| const pathname = usePathname() | |
| return ( | |
| <div id="pathname" data-pathname={pathname}> | |
| {pathname} | |
| </div> | |
| ) | |
| } | |