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() ).

Can you guys help me out? In your opinion is this the right approach?
Was this page helpful?