diff --git a/src/components/ZapDialog.tsx b/src/components/ZapDialog.tsx index f18ef1f..7aff211 100644 --- a/src/components/ZapDialog.tsx +++ b/src/components/ZapDialog.tsx @@ -61,6 +61,8 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { const inputRef = useRef(null); const isMobile = useIsMobile(); + + useEffect(() => { if (target) { setComment('Zapped with MKStack!'); @@ -86,7 +88,7 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { try { const url = await QRCode.toDataURL(invoice.toUpperCase(), { - width: 256, + width: 512, margin: 2, color: { dark: '#000000', @@ -154,86 +156,88 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { const ZapContent = () => ( <> {invoice ? ( -
+
{/* Payment amount display */}
{amount} sats
- + - {/* QR Code */} -
- - - {qrCodeUrl ? ( - Lightning Invoice QR Code - ) : ( -
- )} - - -
+
+ {/* QR Code */} +
+ + + {qrCodeUrl ? ( + Lightning Invoice QR Code + ) : ( +
+ )} + + +
+ + {/* Invoice input */} +
+ +
+ e.currentTarget.select()} + /> + +
+
+ + {/* Payment buttons */} +
+ {hasWebLN && ( + + )} - {/* Invoice input */} -
- -
- e.currentTarget.select()} - /> -
-
- - {/* Payment buttons */} -
- {hasWebLN && ( - - )} - - -
- Scan the QR code or copy the invoice to pay with any Lightning wallet. +
+ Scan the QR code or copy the invoice to pay with any Lightning wallet. +
@@ -306,137 +310,38 @@ export function ZapDialog({ target, children, className }: ZapDialogProps) { } if (isMobile) { - // Full screen payment view on mobile - if (invoice) { - return ( -
- {/* Header with back and close buttons */} -
- - -

Lightning Payment

- - -
- - {/* Content */} -
-
- {/* Payment amount display */} -
-
{amount} sats
-
Lightning Network Payment
-
- - - - {/* QR Code */} -
- - - {qrCodeUrl ? ( - Lightning Invoice QR Code - ) : ( -
- )} - - -
- - {/* Invoice input */} -
- -
- e.currentTarget.select()} - /> - -
-
- - {/* Payment buttons */} -
- {hasWebLN && ( - - )} - - - -
- Scan the QR code or copy the invoice to pay with any Lightning wallet. -
-
-
-
-
- ); - } - - // Drawer for amount selection on mobile + // Use drawer for entire mobile flow, make it full-screen when showing invoice return ( - +
{children}
- + + {/* Back button when showing invoice */} + {invoice && ( + + )} + {/* Close button */}