This pull request addresses an issue where the page.tsx file was encountering a TypeError due to improper handling of non-logged-in users. The fix ensures that before accessing the $id property of the loggedIn user object, a check is performed to verify that the user is indeed logged in. If the user is not logged in (loggedIn is null or undefined), appropriate error handling is implemented to prevent the TypeError from occurring.
Changes Made:
Added a conditional check to verify loggedIn before accessing $id in page.tsx.
Implemented error handling for scenarios where the user is not logged in.
This pull request addresses an issue where the page.tsx file was encountering a TypeError due to improper handling of non-logged-in users. The fix ensures that before accessing the $id property of the loggedIn user object, a check is performed to verify that the user is indeed logged in. If the user is not logged in (loggedIn is null or undefined), appropriate error handling is implemented to prevent the TypeError from occurring.
Changes Made:
Added a conditional check to verify loggedIn before accessing $id in page.tsx. Implemented error handling for scenarios where the user is not logged in.