Help with making pages like dashboards, settings, custom login pages and more by grabbing the session of a already logged in user.
Eliminates the problems of "Session" wrapper or other workarounds. Can be called from clients to get a session, this however is slow and should not be used for things that needs the session immediately like the navbar.
Update use-session.ts
Added functionality to return null, otherwise parent code will never do anything when there is no user logged in.
(This is an issue if parent code checks for a session, if there is none then redirect to a login page.)
Help with making pages like dashboards, settings, custom login pages and more by grabbing the session of a already logged in user.
Eliminates the problems of "Session" wrapper or other workarounds. Can be called from clients to get a session, this however is slow and should not be used for things that needs the session immediately like the navbar.
Added functionality to return null, otherwise parent code will never do anything when there is no user logged in. (This is an issue if parent code checks for a session, if there is none then redirect to a login page.)