Skip to content

Commit

Permalink
chore: added setpreferredlanguage in trading-hub-header and exit-trad…
Browse files Browse the repository at this point in the history
…ers-hub-modal (binary-com#7553)
  • Loading branch information
aizad-deriv authored and Carol Sachdeva committed Feb 9, 2023
1 parent 7970db9 commit dd624f1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const ExitTradersHubModal = ({
account_list,
active_accounts,
setIsLoggingIn,
setPreferredLanguage,
}) => {
const exit_traders_hub_modal_content = (
<Text size={isMobile() ? 'xxs' : 'xs'}>
Expand All @@ -40,6 +41,7 @@ const ExitTradersHubModal = ({
};

const onClickExitButton = async () => {
const language = getLanguage();
setIsPreAppStore(false);
setIsLoggingIn(true);
const cr_account = active_accounts.some(acc => acc.landing_company_shortcode === 'svg');
Expand All @@ -52,7 +54,7 @@ const ExitTradersHubModal = ({
//if eu is currently selected , switch to non-eu on exiting tradershub
await switchAccount(account_list.find(acc => acc.loginid.startsWith('CR'))?.loginid);
}
history.push(routes.root);
setPreferredLanguage(language);
setIsLoggingIn(false);
};

Expand Down Expand Up @@ -100,4 +102,5 @@ export default connect(({ ui, client, traders_hub }) => ({
account_list: client.account_list,
active_accounts: client.active_accounts,
setIsLoggingIn: client.setIsLoggingIn,
setPreferredLanguage: client.setPreferredLanguage,
}))(ExitTradersHubModal);

0 comments on commit dd624f1

Please sign in to comment.