fix: fixed navbar logo redirection from change organisation page #4791
Closed
hrishi82 wants to merge 2 commits into
Closed
fix: fixed navbar logo redirection from change organisation page #4791hrishi82 wants to merge 2 commits into
hrishi82 wants to merge 2 commits into
Conversation
…nisation and clicks on the navbar logo Signed-off-by: Hrishikesh Barman <hrishib4882@gmail.com>
|
👋 Commands for maintainers:
|
…-logo-clickability-navigates-incorrectly
Contributor
|
Thank you but we will not be proceeding with this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #4771
What changed:
Persist the active organization id in sessionStorage, use it for the header logo when the route has no org (e.g. when user is on Change Organisation page), and clear it on sign out.
Why:
After clicking on “Change organization” from the settings menu, users land on "/" route without organizationId in the URL, so the logo targeted "/undefined". We also need a “back to last org” behavior which this PR implements
How:
OrganizationScope (and org list clicks) call setCurrentOrgIdToSessionStorage;
OrganizationMenuButton resolves the logo with organizationId || getCurrentOrgIdFromSessionStorage();
sign out calls clearCurrentOrgIdFromSessionStorage() before /logout.
Related issues:
None
Breaking changes:
None.