import { Button } from '@/components/ui/button' import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '@/components/ui/dialog' import { useNostr } from '@/providers/NostrProvider' import { ArrowLeft } from 'lucide-react' import { Dispatch, useState } from 'react' import { useTranslation } from 'react-i18next' import BunkerLogin from './BunkerLogin' import PrivateKeyLogin from './NsecLogin' export default function LoginDialog({ open, setOpen }: { open: boolean setOpen: Dispatch }) { const { t } = useTranslation() const [loginMethod, setLoginMethod] = useState<'nsec' | 'nip07' | 'bunker' | null>(null) const { nip07Login } = useNostr() return ( {loginMethod === 'nsec' ? ( <>
setLoginMethod(null)} >
setOpen(false)} /> ) : loginMethod === 'bunker' ? ( <>
setLoginMethod(null)} >
setOpen(false)} /> ) : ( <> {!!window.nostr && ( )} )}
) }