Download next.js/test/development/app-dir/segment-explorer/app/search/layout.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 298 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/segment-explorer/app/search/layout.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/development/app-dir/segment-explorer/app/search/layout.tsx
-
curl -L -o layout.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/development/app-dir/segment-explorer/app/search/layout.tsx
298 Bytes
| 'use client' | |
| import { Fragment } from 'react' | |
| import { useSearchParams } from 'next/navigation' | |
| export default function SearchLayout({ | |
| children, | |
| }: { | |
| children: React.ReactNode | |
| }) { | |
| let searchParams = useSearchParams() | |
| return <Fragment key={searchParams?.get('q')}>{children}</Fragment> | |
| } | |