© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
Dario

next.js - make user data available throughout the website? Is it the right approach?

Hi guys, I'm a little lost at this point, and I'm asking for some help. I am creating an application that will need to have a dashboard, but since there are 3 user types, this dashboard will need to be different for each type. I was thinking of making the user data available throughout the site so I can use properties to modify the gui, but I don't know where to start (I have tried unsuccessfully to create a provider using this query:
const { data, error, status } = await supabase.from('profiles').select('*').eq('id', session.user.id).single()
const { data, error, status } = await supabase.from('profiles').select('*').eq('id', session.user.id).single()
).

Can you guys help me out? In your opinion is this the right approach?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Getting user data on dynamic page with Next JS
SupabaseSSupabase / help-and-questions
4y ago
Query data with Next.js
SupabaseSSupabase / help-and-questions
4y ago
How can i get the user data in Next JS Api Route Handler
SupabaseSSupabase / help-and-questions
13mo ago
How to get current user data server side (next.js middleware)
SupabaseSSupabase / help-and-questions
4y ago