From d1f0420d4c8b5dcbe48a171132767bcbe40b0a21 Mon Sep 17 00:00:00 2001 From: hirad-rework Date: Wed, 30 Mar 2022 14:13:02 +0430 Subject: [PATCH 1/2] Mobile language menu does not update active language --- .../src/App/Components/Layout/Header/toggle-menu-drawer.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx b/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx index 155c1748f085..c66681405270 100644 --- a/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx +++ b/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx @@ -7,7 +7,7 @@ import { NetworkStatus } from 'App/Components/Layout/Footer'; import ServerTime from 'App/Containers/server-time.jsx'; import { BinaryLink } from 'App/Components/Routes'; import getRoutesConfig from 'App/Constants/routes-config'; -import { currentLanguage, changeLanguage } from 'Utils/Language'; +import { changeLanguage } from 'Utils/Language'; import LiveChat from 'App/Components/Elements/LiveChat'; const MenuLink = ({ @@ -253,6 +253,9 @@ const ToggleMenuDrawer = React.forwardRef( }; const getLanguageRoutes = () => { + + const currentLanguage = getLanguage(); + return ( Date: Wed, 30 Mar 2022 14:14:52 +0430 Subject: [PATCH 2/2] Get language is added to the component --- .../src/App/Components/Layout/Header/toggle-menu-drawer.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx b/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx index c66681405270..89ddf832ccfd 100644 --- a/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx +++ b/packages/core/src/App/Components/Layout/Header/toggle-menu-drawer.jsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import React from 'react'; import { Div100vhContainer, Icon, MobileDrawer, ToggleSwitch, Text } from '@deriv/components'; import { routes, PlatformContext } from '@deriv/shared'; -import { localize, getAllowedLanguages } from '@deriv/translations'; +import { localize, getAllowedLanguages, getLanguage } from '@deriv/translations'; import { NetworkStatus } from 'App/Components/Layout/Footer'; import ServerTime from 'App/Containers/server-time.jsx'; import { BinaryLink } from 'App/Components/Routes'; @@ -253,7 +253,6 @@ const ToggleMenuDrawer = React.forwardRef( }; const getLanguageRoutes = () => { - const currentLanguage = getLanguage(); return (