diff --git a/src/components/auth/LoginArea.tsx b/src/components/auth/LoginArea.tsx index 1bd7c128..2a102f5b 100644 --- a/src/components/auth/LoginArea.tsx +++ b/src/components/auth/LoginArea.tsx @@ -98,6 +98,10 @@ export function LoginArea({ className }: LoginAreaProps) { setSignupDialogOpen(false)} + onLogin={() => { + setSignupDialogOpen(false); + setLoginDialogOpen(true); + }} /> ); diff --git a/src/components/auth/SimpleSignupDialog.tsx b/src/components/auth/SimpleSignupDialog.tsx index 12f792be..916c6fff 100644 --- a/src/components/auth/SimpleSignupDialog.tsx +++ b/src/components/auth/SimpleSignupDialog.tsx @@ -14,12 +14,14 @@ interface SimpleSignupDialogProps { isOpen: boolean; onClose: () => void; onComplete?: () => void; + onLogin?: () => void; } const SimpleSignupDialog: React.FC = ({ isOpen, onClose, - onComplete + onComplete, + onLogin }) => { const [step, setStep] = useState('key'); const [isLoading, setIsLoading] = useState(false); @@ -120,9 +122,9 @@ const SimpleSignupDialog: React.FC = ({ const handleLoginClick = () => { onClose(); - // This would typically open the login modal - // Since we don't have direct access to the login modal state here, - // we'll rely on the parent component to handle this + if (onLogin) { + onLogin(); + } }; if (step === 'key') { diff --git a/src/pages/NostrSettings.tsx b/src/pages/NostrSettings.tsx index 9996b9c5..cf8112a9 100644 --- a/src/pages/NostrSettings.tsx +++ b/src/pages/NostrSettings.tsx @@ -222,6 +222,10 @@ export function NostrSettings() { isOpen={showSignupDialog} onClose={() => setShowSignupDialog(false)} onComplete={handleSignupComplete} + onLogin={() => { + setShowSignupDialog(false); + setShowLoginDialog(true); + }} /> );