import { useSecondaryPage } from '@/PageManager' import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog' import { Button } from '@/components/ui/button' import SecondaryPageLayout from '@/layouts/SecondaryPageLayout' import { toRizful } from '@/lib/link' import { useZap } from '@/providers/ZapProvider' import { disconnect, launchModal } from '@getalby/bitcoin-connect-react' import { forwardRef } from 'react' import { useTranslation } from 'react-i18next' import DefaultZapAmountInput from './DefaultZapAmountInput' import DefaultZapCommentInput from './DefaultZapCommentInput' import LightningAddressInput from './LightningAddressInput' import QuickZapSwitch from './QuickZapSwitch' const WalletPage = forwardRef(({ index }: { index?: number }, ref) => { const { t } = useTranslation() const { push } = useSecondaryPage() const { isWalletConnected, walletInfo } = useZap() return ( {isWalletConnected ? (
{walletInfo?.node.alias && (
{t('Connected to')} {walletInfo.node.alias}
)} {t('Are you absolutely sure?')} {t('You will not be able to send zaps to others.')} {t('Cancel')} disconnect()}> {t('Disconnect')}
) : (
)}
) }) WalletPage.displayName = 'WalletPage' export default WalletPage