diff --git a/src/features/ui/components/modals/nostr-signin-modal/nostr-signin-modal.tsx b/src/features/ui/components/modals/nostr-signin-modal/nostr-signin-modal.tsx index 91b91d964a..c6ed261960 100644 --- a/src/features/ui/components/modals/nostr-signin-modal/nostr-signin-modal.tsx +++ b/src/features/ui/components/modals/nostr-signin-modal/nostr-signin-modal.tsx @@ -6,9 +6,8 @@ import ExtensionStep from './steps/extension-step'; import IdentityStep from './steps/identity-step'; import KeyStep from './steps/key-step'; import KeygenStep from './steps/keygen-step'; -import RegisterStep from './steps/register-step'; -type Step = 'extension' | 'identity' | 'key' | 'keygen' | 'account' | 'register'; +type Step = 'extension' | 'identity' | 'key' | 'keygen' | 'account'; interface INostrSigninModal { onClose: (type?: string) => void; @@ -33,8 +32,6 @@ const NostrSigninModal: React.FC = ({ onClose }) => { return ; case 'account': return ; - case 'register': - return ; default: return null; } diff --git a/src/features/ui/components/modals/nostr-signin-modal/steps/account-step.tsx b/src/features/ui/components/modals/nostr-signin-modal/steps/account-step.tsx index 28bd9d6b10..712e8911a8 100644 --- a/src/features/ui/components/modals/nostr-signin-modal/steps/account-step.tsx +++ b/src/features/ui/components/modals/nostr-signin-modal/steps/account-step.tsx @@ -19,8 +19,8 @@ const AccountStep: React.FC = ({ accountId, setStep, onClose }) => const { account } = useAccount(accountId); const instance = useInstance(); - const isBech32 = useMemo( - () => n.bech32().safeParse(account?.acct).success, + const username = useMemo( + () => n.bech32().safeParse(account?.acct).success ? account?.acct.slice(0, 13) : account?.acct, [account?.acct], ); @@ -49,7 +49,7 @@ const AccountStep: React.FC = ({ accountId, setStep, onClose }) => - {isBech32 ? account.acct.slice(0, 13) : account.acct} + {username} diff --git a/src/features/ui/components/modals/nostr-signin-modal/steps/register-step.tsx b/src/features/ui/components/modals/nostr-signin-modal/steps/register-step.tsx deleted file mode 100644 index 4e6cdbc5e1..0000000000 --- a/src/features/ui/components/modals/nostr-signin-modal/steps/register-step.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { FormattedMessage } from 'react-intl'; - -import { Stack, Modal } from 'soapbox/components/ui'; - -interface IRegisterStep { - onClose(): void; -} - -const RegisterStep: React.FC = ({ onClose }) => { - return ( - } onClose={onClose}> - - register step - - - ); -}; - -export default RegisterStep;