#User data passing in navbar problem

1 messages · Page 1 of 1 (latest)

rough thorn
#

I added custom authentication in Next.js . When i want to send user data to the Navbar component getCurrentUser() function then the most of the pages converted to the dynamic page.. As i know the best practice is to keep the pages to static. Please help. Thank you in advance.

amber sageBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

heavy knot
# rough thorn I added custom authentication in Next.js . When i want to send user data to the ...

when it would be static, it would mean, that the page is created during build time and that would mean, that all people would get the same version. However, that would be horrible, when looking from the auth perspective. So you need to have them dynamic.

In next16 cache components are introduced, that build a static shell and only parts of the page are dynamic and those parts can also be cached even if its user related content (depending on user). You might want to have a look at that

rough thorn
heavy knot
amber sageBOT
heavy knot
#

happy to help