adrianhajdin / banking

Horizon is a modern banking platform for everyone.
https://banking-jet.vercel.app
MIT License
1.9k stars 574 forks source link

Fixes handling of non-logged-in user in page.tsx to prevent TypeError #27

Closed tematz closed 3 months ago

tematz commented 3 months ago

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.

vercel[bot] commented 3 months ago

@tematz is attempting to deploy a commit to the JS Mastery Pro Team on Vercel.

A member of the Team first needs to authorize it.