amur_sri
TTCTheo's Typesafe Cult
•Created by amur_sri on 6/10/2023 in #questions
Get Active Link from Server Component (Next.js 13.4)
I was making a basic Navigation for a Webpage. Since all React Components in Next 13.3 are by default Server Component if there a way to get the current page pathname from the server itself or do I have to use the 'use Client' and use the 'usePathname()'? I just want to highlight the active link in the navigation.
Currently, usePathname() is the recommended way according to the Docs: https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#checking-active-links
2 replies
TTCTheo's Typesafe Cult
•Created by amur_sri on 11/23/2022 in #questions
Insert Role before authenticating in Next Auth
18 replies