mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
## Description At [replace all 'athName' with 'athname' for consistency](https://github.com/vercel/next.js/pull/70690), the all `pathName` is replaced by `pathname`. Then `path-name` should also change `pathname`. x-ref: #70690 Co-authored-by: JJ Kasper <[email protected]>
11 lines
207 B
JavaScript
11 lines
207 B
JavaScript
import { usePathname } from 'next/navigation'
|
|
|
|
export function ReadPathname() {
|
|
const pathname = usePathname()
|
|
return (
|
|
<div id="pathname" data-pathname={pathname}>
|
|
{pathname}
|
|
</div>
|
|
)
|
|
}
|