diff --git a/src/components/CreditsDialog.tsx b/src/components/CreditsDialog.tsx index 1bf6dc49..1b424d74 100644 --- a/src/components/CreditsDialog.tsx +++ b/src/components/CreditsDialog.tsx @@ -1,7 +1,7 @@ import { useState, useEffect } from 'react'; import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'; import QRCode from 'qrcode'; -import { CreditCard, Zap, ExternalLink, RefreshCw, Check, X, Clock, AlertCircle, Copy, RotateCcw } from 'lucide-react'; +import { CreditCard, Zap, ExternalLink, RefreshCw, Check, X, Clock, AlertCircle, Copy, RotateCcw, ArrowLeft } from 'lucide-react'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; @@ -178,20 +178,6 @@ function LightningPayment({ invoice, amount, onClose }: LightningPaymentProps) { )} - - {/* Invoice Text (for manual copying) */} -
- -
- {invoice} -
-
- -
- -
); } @@ -426,8 +412,22 @@ export function CreditsDialog({ open, onOpenChange, providerId, connection }: Cr - - Credits + {lightningInvoice ? ( + <> + + + ) : ( + <> + + Credits + + )} @@ -437,10 +437,7 @@ export function CreditsDialog({ open, onOpenChange, providerId, connection }: Cr { - setLightningInvoice(null); - onOpenChange(false); - }} + onClose={() => setLightningInvoice(null)} /> ) : ( <>