From 08ef4d2df2d7ecdf8526c8176f13ca14f4e2eacc Mon Sep 17 00:00:00 2001
From: yauheni-kryzhyk-deriv
<103182683+yauheni-kryzhyk-deriv@users.noreply.github.com>
Date: Wed, 2 Nov 2022 09:27:21 +0300
Subject: [PATCH] yauheni/79513/no language redirection from derivapp (#6824)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* yauheni/79513/no language redirection from derivapp
* functions call refactor
Co-authored-by: “yauheni-kryzhyk-deriv” <“yauheni@deriv.me”>
---
.../components/src/components/static-url/static-url.jsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/packages/components/src/components/static-url/static-url.jsx b/packages/components/src/components/static-url/static-url.jsx
index 52fb32e68b2f..6dbd744f5b45 100644
--- a/packages/components/src/components/static-url/static-url.jsx
+++ b/packages/components/src/components/static-url/static-url.jsx
@@ -1,11 +1,16 @@
import React from 'react';
-import { getStaticUrl, PlatformContext } from '@deriv/shared';
+import { getStaticUrl, PlatformContext, setUrlLanguage } from '@deriv/shared';
+import { getLanguage } from '@deriv/translations';
const StaticUrl = ({ href, is_document, children, ...props }) => {
const { is_appstore } = React.useContext(PlatformContext);
+ const getHref = () => {
+ setUrlLanguage(getLanguage());
+ return getStaticUrl(href, { is_appstore }, is_document);
+ };
return (
-
+
{children}
);