From 4bfebf9f798d073052fc8b9fbceb3ec3931a557f Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja <1805317@kiit.ac.in> Date: Fri, 15 Dec 2023 13:02:01 +0530 Subject: [PATCH] refactor: key fix --- .../Routing/AdvancedRouting/RoutingPreviewer.res | 13 +++++-------- .../RoutingRevamp/AdvancedRoutingUIUtils.res | 3 ++- .../HyperSwitch/SwitchMerchant/SwitchMerchant.res | 4 ++-- .../HyperSwitch/ThreeDSFlow/HSwitchThreeDS.res | 1 + .../HyperSwitch/Utils/HSSelfServeSidebar.res | 8 ++++++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/screens/HyperSwitch/Routing/AdvancedRouting/RoutingPreviewer.res b/src/screens/HyperSwitch/Routing/AdvancedRouting/RoutingPreviewer.res index f4f65963e..951b18891 100644 --- a/src/screens/HyperSwitch/Routing/AdvancedRouting/RoutingPreviewer.res +++ b/src/screens/HyperSwitch/Routing/AdvancedRouting/RoutingPreviewer.res @@ -4,7 +4,7 @@ open RoutingUtils module SimplePreview = { @react.component let make = (~gateways) => { - if gateways->Js.Array2.length > 0 { + Js.Array2.length > 0}>
React.array}
- } else { - React.null - } +
} } module GatewayView = { @@ -189,16 +187,15 @@ module RulePreviewer = { {React.string(string_of_int(index + 1))}
{gateway->React.string}
- {if index !== ruleInfo.default_gateways->Js.Array2.length - 1 { + Js.Array2.length - 1}> ()} /> - } else { - React.null - }} + }) ->React.array} diff --git a/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res b/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res index f2d08737e..31f8ce1d6 100644 --- a/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res +++ b/src/screens/HyperSwitch/RoutingRevamp/AdvancedRoutingUIUtils.res @@ -19,9 +19,10 @@ module LogicalOps = { {["AND", "OR"] - ->Js.Array2.map(text => { + ->Array.mapWithIndex((text, i) => { let active = logicalOpsInput.value->LogicUtils.getStringFromJson("") === text