How to get the pagename
Answered
Havana posted this in #help-forum
HavanaOP
how can I get the page name from the
layout.tsx that was generated with Metadata inside a dynamic route5 Replies
@Havana how can I get the page name from the `layout.tsx` that was generated with Metadata inside a dynamic route
you can convert the layout.tsx to a client component and use
usePathnamewait check this to get dynamic route parameters
HavanaOP
good thing I mentioned the dynamic route
@Anay-208 you can convert the layout.tsx to a client component and use `usePathname`
HavanaOP
thank you very much