// NOTE: This file is stable and usually should not be modified. // It is important that all functionality in this file is preserved, and should only be modified if explicitly requested. import React, { useState, useEffect } from 'react'; import { Button } from '@/components/ui/button'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { toast } from '@/hooks/useToast'; import NostrExtensionIndicator from './NostrExtensionIndicator'; import { cn } from '@/lib/utils'; interface SignupDialogProps { isOpen: boolean; onClose: () => void; onComplete?: () => void; onLogin?: () => void; } const SignupDialog: React.FC = ({ isOpen, onClose, onLogin }) => { const [step, setStep] = useState<'key' | 'keygen'>('key'); const handleGenerateKey = () => { setStep('keygen'); }; const handleHasKey = () => { onClose(); // This would trigger the login dialog to open with the key-add step // For now, we'll just show a toast message toast({ title: 'Use Login Instead', description: 'Please use the login dialog to enter your existing key.', }); }; const handleExtensionLogin = () => { if (onLogin) { onLogin(); } onClose(); }; // Reset state when dialog opens useEffect(() => { if (isOpen) { setStep('key'); } }, [isOpen]); return ( Sign up
{step === 'key' && (

You need a key to continue

🔑
)} {step === 'keygen' && (

Key Generation Coming Soon

Key generation feature is being developed. For now, please use an existing key or browser extension.

)}
or
); }; export default SignupDialog;