diff --git a/src/screens/HyperSwitch/Routing/RoutingUtils.res b/src/screens/HyperSwitch/Routing/RoutingUtils.res index e8a8d03af..b50f3fbad 100644 --- a/src/screens/HyperSwitch/Routing/RoutingUtils.res +++ b/src/screens/HyperSwitch/Routing/RoutingUtils.res @@ -170,44 +170,6 @@ let constructNameDescription = routingType => { let currentTabNameRecoilAtom = Recoil.atom(. "currentTabName", "ActiveTab") -module SaveAndActivateButton = { - @react.component - let make = ( - ~onSubmit: (Js.Json.t, 'a) => promise>, - ~handleActivateConfiguration, - ) => { - let formState: ReactFinalForm.formState = ReactFinalForm.useFormState( - ReactFinalForm.useFormSubscription(["values"])->Js.Nullable.return, - ) - - let handleSaveAndActivate = async _ev => { - try { - let onSubmitResponse = await onSubmit(formState.values, false) - let currentActivatedFromJson = - onSubmitResponse->Js.Nullable.toOption->Belt.Option.getWithDefault(Js.Json.null) - let currentActivatedId = - currentActivatedFromJson->LogicUtils.getDictFromJsonObject->LogicUtils.getString("id", "") - let _ = await handleActivateConfiguration(Some(currentActivatedId)) - } catch { - | Js.Exn.Error(e) => - let _err = - Js.Exn.message(e)->Belt.Option.getWithDefault( - "Failed to save and activate configuration!", - ) - } - } -