router.pathname doesn't working
Answered
Mandarin fish posted this in #help-forum
Mandarin fishOP
I tried to use router.pathname but it doesn't work
path:
localhost:3000/settings
path:
localhost:3000/settings
Answered by Ray
use
usePathname hook from next/navigation if you are using app router2 Replies
@Mandarin fish I tried to use router.pathname but it doesn't work
path:
localhost:3000/settings
use
usePathname hook from next/navigation if you are using app routerAnswer