Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update navigation logic and fix URL handling (#161)
* fix: update redirect logic to use sessionStorage - Changed the redirect mechanism to utilize sessionStorage instead of localStorage for better session management. - This adjustment addresses an issue where the shouldRedirect flag remained in localStorage, causing unintended navigation to the main page when entering an invite URL. - The use of sessionStorage ensures that the flag is cleared upon page refresh, preventing unwanted redirects and enhancing user experience. * chore: Fix URL handling after navigation to main page - Added a useEffect hook to change the current URL to the root ("/") when navigating to the main page. - This modification ensures that after the handleBeforeUnload event triggers and redirects the user, the URL reflects the main page correctly instead of retaining the previous URL. - Enhances user experience by providing a consistent and expected URL state upon navigation.
- Loading branch information