This page uses the useSession() React Hook.
The useSession() React Hook is easy to use and allows pages to render very quickly.
The advantage of this approach is that session state is shared between pages by using the Provider in _app.js so that navigation between pages using useSession() is very fast.
The disadvantage of useSession() is that it requires client side JavaScript.
This page is protected using the useSession hook.
Either way works.
But in this case the session is not available on the first render.