From 75e4731b191c8d9e59d19bb1888642dfeb97f584 Mon Sep 17 00:00:00 2001 From: Josue Echandia Date: Tue, 28 Jun 2022 17:44:27 -0500 Subject: [PATCH 001/178] Use quotation marks --- .../settings/Payments/PaymentMethodList.js | 45 ++++++++++--------- .../Payments/PaymentsPage/BasePaymentsPage.js | 37 +++++++++++---- 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/src/pages/settings/Payments/PaymentMethodList.js b/src/pages/settings/Payments/PaymentMethodList.js index 9f1ddd25ea33..05d35a172551 100644 --- a/src/pages/settings/Payments/PaymentMethodList.js +++ b/src/pages/settings/Payments/PaymentMethodList.js @@ -151,23 +151,6 @@ class PaymentMethodList extends Component { }); } - if (!this.props.shouldShowAddPaymentMethodButton) { - return combinedPaymentMethods; - } - - combinedPaymentMethods.push({ - type: BUTTON, - text: this.props.translate('paymentMethodList.addPaymentMethod'), - icon: Expensicons.CreditCard, - style: [styles.mh4], - iconStyles: [styles.mr4], - onPress: e => this.props.onPress(e), - isDisabled: this.props.isLoadingPayments, - shouldShowRightIcon: true, - success: true, - key: 'addPaymentMethodButton', - }); - return combinedPaymentMethods; } @@ -235,11 +218,29 @@ class PaymentMethodList extends Component { render() { return ( - item.key} - /> + <> + item.key} + /> + { + this.props.shouldShowAddPaymentMethodButton + && ( +