Fix navigating between NostrSignup and NostrLogin

environments/review-ditto-auth-csh1vn/deployments/4454
Alex Gleason 6 months ago
parent ddee1d9d4e
commit e866b95282
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

@ -7,10 +7,11 @@ type Step = 'extension' | 'key-add';
interface INostrLoginModal {
onClose: (type?: string) => void;
step?: Step;
}
const NostrLoginModal: React.FC<INostrLoginModal> = ({ onClose }) => {
const [step, setStep] = useState<Step>(window.nostr ? 'extension' : 'key-add');
const NostrLoginModal: React.FC<INostrLoginModal> = ({ onClose, step: firstStep }) => {
const [step, setStep] = useState<Step>(firstStep ?? (window.nostr ? 'extension' : 'key-add'));
const handleClose = () => onClose('NOSTR_LOGIN');

@ -19,7 +19,7 @@ const KeyStep: React.FC<IKeyStep> = ({ setStep, onClose }) => {
const onAltClick = () => {
onClose();
dispatch(openModal('NOSTR_LOGIN'));
dispatch(openModal('NOSTR_LOGIN', { step: 'key-add' }));
};
return (

Loading…
Cancel
Save