Getting User Info from route page
I might be fundamentally misunderstanding how this is supposed to work, so if that is the case please let me know.
I'm authenticating with Supabase via the /signin route, which stores the jwt in a cookie.
Now, when I load up index.tsx I'm hoping to get the User data to render on the page. Something simple like a "Hello {Username}".
Here is what my index.tsx looks like:
How do I get that same data into the component?
This is where I think there's a gap in my understanding of how this works. So any insight would be incredible.
Thank you all,
I'm authenticating with Supabase via the /signin route, which stores the jwt in a cookie.
Now, when I load up index.tsx I'm hoping to get the User data to render on the page. Something simple like a "Hello {Username}".
Here is what my index.tsx looks like:
getUser() works as expected and retrieves the user's information. The console.log in routeData() displays user data. Hooray.How do I get that same data into the component?
useRouteData doesn't seem to have it, and the console.log("Render:"... seems to be happening well before the routeData() function has finished.This is where I think there's a gap in my understanding of how this works. So any insight would be incredible.
Thank you all,
