mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Co-authored-by: Tim Neutkens <[email protected]> Fixes https://github.com/vercel/next.js/issues/42715
15 lines
305 B
JavaScript
15 lines
305 B
JavaScript
'use client'
|
|
import { usePathname, useSearchParams } from 'next/navigation'
|
|
|
|
export default function Page() {
|
|
const pathname = usePathname()
|
|
const searchParams = useSearchParams()
|
|
|
|
return (
|
|
<>
|
|
<p id="pathname">{pathname}</p>
|
|
<p id="slug">{searchParams.get('slug')}</p>
|
|
</>
|
|
)
|
|
}
|