From ee8aa46bbfb2117a6726646046bdf31ca3fd2c6e Mon Sep 17 00:00:00 2001 From: "open-swe-dev-andrinoid[bot]" Date: Thu, 22 Jan 2026 00:27:12 +0000 Subject: [PATCH] Apply patch [skip ci] --- islands/PaymentMethodsList.tsx | 296 ++++++++++++++++----------------- 1 file changed, 147 insertions(+), 149 deletions(-) diff --git a/islands/PaymentMethodsList.tsx b/islands/PaymentMethodsList.tsx index a44a875..7d64b67 100644 --- a/islands/PaymentMethodsList.tsx +++ b/islands/PaymentMethodsList.tsx @@ -30,7 +30,7 @@ export default function PaymentMethodsList( ProcessedPaymentMethod[] >([]); const [isProcessing, setIsProcessing] = useState(false); - const [_isOpeningModal, setIsOpeningModal] = useState(openModal); + const [_isOpeningModal, _setIsOpeningModal] = useState(openModal); // Process payment methods on component mount and when paymentMethods or userId change useEffect(() => { @@ -63,7 +63,7 @@ export default function PaymentMethodsList( const updatedMethods: ProcessedPaymentMethod[] = []; for (const method of paymentMethods) { - const processedMethod = { ...method }; + const processedMethod: ProcessedPaymentMethod = { ...method }; // Decrypt and mask account number if (method.account_number_encrypted) { @@ -75,8 +75,8 @@ export default function PaymentMethodsList( if (decryptedData) { const accountNumber = decryptedData; // Show only last 4 digits - processedMethod.maskedAccountNumber = "****" + - accountNumber.slice(-4); + processedMethod.maskedAccountNumber = + "****" + accountNumber.slice(-4); } } catch (error) { console.error("Failed to decrypt account number:", error); @@ -93,8 +93,8 @@ export default function PaymentMethodsList( if (decryptedData) { const routingNumber = decryptedData; // Show only last 4 digits - processedMethod.maskedRoutingNumber = "****" + - routingNumber.slice(-4); + processedMethod.maskedRoutingNumber = + "****" + routingNumber.slice(-4); } } catch (error) { console.error("Failed to decrypt routing number:", error); @@ -147,155 +147,153 @@ export default function PaymentMethodsList( {popupAddPaymentMethodDialog}
- {processedMethods.length === 0 - ? ( -
- - - -

- No payment methods -

-

- Add a payment method to get started with rent payments. -

+ {processedMethods.length === 0 ? ( +
+ + + +

+ No payment methods +

+

+ Add a payment method to get started with rent payments. +

+ +
+ ) : ( + <> +
    + {processedMethods.map((method) => ( +
  • +
    +
    +
    +

    + {method.bank_name || "Bank Account"} +

    + {method.is_default && ( + + Default + + )} +
    +
    +
    + Type:{" "} + {method.account_type === "checking" + ? "Checking" + : method.account_type === "savings" + ? "Savings" + : method.account_type || "Unknown"} +
    +
    + Account:{" "} + {method.maskedAccountNumber || "****"} +
    +
    + Routing:{" "} + {method.maskedRoutingNumber || "****"} +
    +
    +
    + +
    + {!method.is_default && ( + + )} + +
    + + + +
    +
    +
    +
  • + ))} +
+ +
- ) - : ( - <> -
    - {processedMethods.map((method) => ( -
  • -
    -
    -
    -

    - {method.bank_name || "Bank Account"} -

    - {method.is_default && ( - - Default - - )} -
    -
    -
    - Type:{" "} - {method.account_type === "checking" - ? "Checking" - : method.account_type === "savings" - ? "Savings" - : method.account_type || "Unknown"} -
    -
    - Account:{" "} - {method.maskedAccountNumber || "****"} -
    -
    - Routing:{" "} - {method.maskedRoutingNumber || "****"} -
    -
    -
    - -
    - {!method.is_default && ( - - )} - -
    - - - -
    -
    -
    -
  • - ))} -
- -
- -
- - )} + + )}
);