From 77861e5bb200246146f2ffa200a9c9da0c76f57e Mon Sep 17 00:00:00 2001 From: hirad-rewok <91878582+hirad-rewok@users.noreply.github.com> Date: Wed, 27 Apr 2022 10:24:56 +0430 Subject: [PATCH] Hirad/Mobile active language update issue (#5132) * Mobile language menu does not update active language * Get language is added to the component --- .../src/App/Components/Layout/Header/toggle-menu-drawer.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 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 6d79dc5dc8c4..18cda609ee12 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,12 +2,12 @@ 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'; 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 = ({ @@ -254,6 +254,8 @@ const ToggleMenuDrawer = React.forwardRef( }; const getLanguageRoutes = () => { + const currentLanguage = getLanguage(); + return (