Remove unused RegisterStep
This commit is contained in:
parent
b9a0c1f0f6
commit
338d0a7b3e
3 changed files with 4 additions and 27 deletions
|
@ -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<INostrSigninModal> = ({ onClose }) => {
|
|||
return <KeygenStep setAccountId={setAccountId} setSigner={setSigner} setStep={setStep} onClose={handleClose} />;
|
||||
case 'account':
|
||||
return <AccountStep accountId={accountId!} setStep={setStep} onClose={handleClose} />;
|
||||
case 'register':
|
||||
return <RegisterStep onClose={handleClose} />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@ const AccountStep: React.FC<IAccountStep> = ({ 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<IAccountStep> = ({ accountId, setStep, onClose }) =>
|
|||
|
||||
<Tooltip text={account.nostr.npub ?? account.acct}>
|
||||
<Text size='sm' theme='muted' align='center' truncate>
|
||||
{isBech32 ? account.acct.slice(0, 13) : account.acct}
|
||||
{username}
|
||||
</Text>
|
||||
</Tooltip>
|
||||
</Stack>
|
||||
|
|
|
@ -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<IRegisterStep> = ({ onClose }) => {
|
||||
return (
|
||||
<Modal title={<FormattedMessage id='nostr_signin.register.title' defaultMessage='Create account' />} onClose={onClose}>
|
||||
<Stack space={3}>
|
||||
register step
|
||||
</Stack>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default RegisterStep;
|
Loading…
Reference in a new issue