Moved redirection logic on pages to server-side reducing the round trip of redirect from browser using hooks.
Refactored codebase to separate main page route files (page.tsx within /app) from others like lib & components to reduce confusion in routing.
refactored to separate pages & others
NOTE: Adding a User ID to JWT takes place when the user signs in so change the NEXTAUTH_SECRET to make the older JWTs invalid as they don't contain a User ID.
This PR does the following
refactored to separate pages & others
NOTE: Adding a User ID to JWT takes place when the user signs in so change the NEXTAUTH_SECRET to make the older JWTs invalid as they don't contain a User ID.