-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suisin/chore: fix redirection to dtrader everytime landing on home page after coming from smart trader #18120
Suisin/chore: fix redirection to dtrader everytime landing on home page after coming from smart trader #18120
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information.
|
⏳ Generating Lighthouse report... |
@@ -95,6 +95,14 @@ const Trade = observer(() => { | |||
return null; | |||
}, [try_synthetic_indices, try_open_markets, category, subcategory]); | |||
|
|||
React.useEffect(() => { | |||
const has_session_storage = !!sessionStorage.getItem('tradershub_redirect_to'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[m] by right this should be placed on the logic when we are redirecting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't clear the sessionStorage when routing happen is because OIDC call back page depends on the sessionStorage route, if we remove it before we redirect them to Dtrader page, when OIDC kicks in, it will bring user back to the tradershub home page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changes:
Clear session storage once we land on Dtrader page so that OIDC won't take the session storage value
Screenshots:
Please provide some screenshots of the change.