From 7fb98872e7223db59313d3edbb5fe20c66c4be98 Mon Sep 17 00:00:00 2001 From: Shivam25092001 Date: Fri, 18 Oct 2024 17:49:05 +0530 Subject: [PATCH] fix: added on click event for add-pm-button --- src/components/modules/HyperModule.res | 2 ++ src/pages/paymentMethodsManagement/PaymentMethodListItem.res | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/modules/HyperModule.res b/src/components/modules/HyperModule.res index 22ece7a..4a3fcc8 100644 --- a/src/components/modules/HyperModule.res +++ b/src/components/modules/HyperModule.res @@ -24,6 +24,7 @@ type hyperModule = { exitWidget: (string, string) => unit, exitCardForm: string => unit, launchWidgetPaymentSheet: (string, Dict.t => unit) => unit, + onAddPaymentMethod: string => unit, exitWidgetPaymentsheet: (int, string, bool) => unit, } let getStrFunFromKey = key => { @@ -64,6 +65,7 @@ let hyperModule = { exitWidget: getStrFun2FromKey("exitWidget"), exitCardForm: getStrFunFromKey("exitCardForm"), launchWidgetPaymentSheet: getStrFunWithCallbackFromKey("launchWidgetPaymentSheet"), + onAddPaymentMethod: getStrFunFromKey("onAddPaymentMethod"), exitWidgetPaymentsheet: getIntStrBoolFunFromKey("exitWidgetPaymentsheet"), } diff --git a/src/pages/paymentMethodsManagement/PaymentMethodListItem.res b/src/pages/paymentMethodsManagement/PaymentMethodListItem.res index a017955..a950a7d 100644 --- a/src/pages/paymentMethodsManagement/PaymentMethodListItem.res +++ b/src/pages/paymentMethodsManagement/PaymentMethodListItem.res @@ -9,7 +9,7 @@ module AddPaymentMethodButton = { ( - // TODO: navigate to ADD_PM_SCREEN + HyperModule.hyperModule.onAddPaymentMethod("") )} style={viewStyle( ~paddingVertical=16.->dp,