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. +

+ +
+ ) : ( + <> + + +
- ) - : ( - <> - - -
- -
- - )} + + )}
);