Skip to content

Commit

Permalink
chore: added is logged in check for removing session storage
Browse files Browse the repository at this point in the history
  • Loading branch information
suisin-deriv committed Mar 10, 2025
1 parent 0db0517 commit a7defd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/trader/src/Modules/Trading/Containers/trade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Trade = observer(() => {
is_dark_mode_on: is_dark_theme,
notification_messages_ui: NotificationMessages,
} = ui;
const { is_eu } = client;
const { is_eu, is_logged_in } = client;
const { network_status } = common;
const { isDesktop, isMobile, isTabletPortrait } = useDevice();

Expand Down Expand Up @@ -98,7 +98,7 @@ const Trade = observer(() => {
React.useEffect(() => {
const has_session_storage = !!sessionStorage.getItem('tradershub_redirect_to');

if (has_session_storage) {
if (has_session_storage && is_logged_in) {
sessionStorage.removeItem('tradershub_redirect_to');
}
}, []);
Expand Down

0 comments on commit a7defd8

Please sign in to comment.