From 6be3ba5512c6d2500359dd6e60e6869234a3ab4b Mon Sep 17 00:00:00 2001 From: meenakshi-deriv Date: Mon, 24 Jun 2024 14:58:30 +0400 Subject: [PATCH] fix: removed object key mapping --- src/javascript/app/pages/bottom/tabs.jsx | 54 ++++++++++-------------- 1 file changed, 22 insertions(+), 32 deletions(-) diff --git a/src/javascript/app/pages/bottom/tabs.jsx b/src/javascript/app/pages/bottom/tabs.jsx index 52aa850259a..61c70413a3e 100644 --- a/src/javascript/app/pages/bottom/tabs.jsx +++ b/src/javascript/app/pages/bottom/tabs.jsx @@ -79,15 +79,13 @@ const Explanation = () => { return (
{/* ========== Winning ========== */} -
- {Object.keys(contractExplanationData.winning).map((key) => ( -
-

{localize(contractExplanationData.winning[key].title)}

- {contractExplanationData.winning[key].content.map((data, idx) => ( -

{localize(data)}

- ))} -
- ))} +
+
+

{localize('Winning the contract')}

+ {contractExplanationData.winning[form_name].content.map((data, idx) => ( +

{localize(data)}

+ ))} +
{/* ========== Image ========== */} @@ -107,35 +105,27 @@ const Explanation = () => { {/* ========== Explain ========== */}
- {Object.keys(contractExplanationData.explain).map((key) => ( -
-

{localize(contractExplanationData.explain[key].title)}

- {contractExplanationData.explain[key].content.map((data, idx) => ( -

{localize(data)}

- ))} - {contractExplanationData.explain[key].title_secondary && -

{localize(contractExplanationData.explain[key].title_secondary)}

} - {contractExplanationData.explain[key].content_secondary && - contractExplanationData.explain[key].content_secondary.map((data, idx) => ( + +

{localize(contractExplanationData.explain[form_name].title)}

+ {contractExplanationData.explain[form_name].content.map((data, idx) => ( +

{localize(data)}

+ ))} + {contractExplanationData.explain[form_name].title_secondary && +

{localize(contractExplanationData.explain[form_name].title_secondary)}

} + {contractExplanationData.explain[form_name].content_secondary && + contractExplanationData.explain[form_name].content_secondary.map((data, idx) => (

{localize(data)}

))} - -
- ))} +
{/* ========== Note ========== */} - - {Object.keys(contractExplanationData.note).map((key) => ( -
-

{contractExplanationData.note[key].content.map((data, idx) => ( -

{localize(data)}

- ))} - -

-
+ +

{contractExplanationData.note[form_name].content.map((data, idx) => ( +

{localize(data)}

))} - + +

);