usePathname
next/navigation
Next.js v13から入った
docs
https://beta.nextjs.org/docs/api-reference/use-router
useRouterのasPathはusePathnameに代替可能