From bd47c3220f5f3d8e223ade019e7e680ab987374b Mon Sep 17 00:00:00 2001 From: highperfocused Date: Mon, 21 Apr 2025 13:19:44 +0200 Subject: [PATCH] Enhance ZapButton component to provide visual feedback for payment completion; update QR code display and messaging based on payment status. --- components/ZapButton.tsx | 47 +++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/components/ZapButton.tsx b/components/ZapButton.tsx index 342654c..432644a 100644 --- a/components/ZapButton.tsx +++ b/components/ZapButton.tsx @@ -283,10 +283,6 @@ export default function ZapButton({ event }: { event: any }) { )} - - Zaps - - {errorMessage && (
{errorMessage} @@ -295,28 +291,43 @@ export default function ZapButton({ event }: { event: any }) { {invoice ? (
-
- -
+ {paymentComplete ? ( +
+ +

+ Payment Complete! +

+
+ ) : ( +
+ +
+ )} +

- Scan this QR code with a Lightning wallet to pay the invoice + {paymentComplete + ? "Your payment has been received and confirmed!" + : "Scan this QR code with a Lightning wallet to pay the invoice"}

+
{invoice}
- {paymentComplete ? ( -
+ + {paymentComplete && ( +
- Payment Complete! + Zap sent successfully!
- ) : null} + )} +
) : ( <> -
+
-
- - );