feat: make sure to set the account create state to done

pull/3056/head
William Grant 1 year ago
parent ec7ab04d09
commit 99a6b103fe

@ -1,10 +1,14 @@
import { useEffect, useState } from 'react';
import { useDispatch } from 'react-redux';
import styled from 'styled-components';
import { SettingsKey } from '../../../data/settings-key';
import { ToastUtils } from '../../../session/utils';
import { sanitizeSessionUsername } from '../../../session/utils/String';
import { trigger } from '../../../shims/events';
import { AccountCreation } from '../../../state/onboarding/ducks/registration';
import {
AccountCreation,
setAccountCreationStep,
} from '../../../state/onboarding/ducks/registration';
import {
useOnboardAccountCreationStep,
useOnboardGeneratedRecoveryPhrase,
@ -95,6 +99,8 @@ export const CreateAccount = () => {
const generatedRecoveryPhrase = useOnboardGeneratedRecoveryPhrase();
const hexGeneratedPubKey = useOnboardHexGeneratedPubKey();
const dispatch = useDispatch();
const [displayName, setDisplayName] = useState('');
const [displayNameError, setDisplayNameError] = useState<undefined | string>('');
@ -114,6 +120,8 @@ export const CreateAccount = () => {
displayName,
generatedRecoveryPhrase,
});
dispatch(setAccountCreationStep(AccountCreation.Done));
};
return (

@ -13,7 +13,7 @@ export enum AccountCreation {
/** starting screen */
DisplayName,
/** show conversation screen */
Complete,
Done,
}
export enum AccountRestoration {

Loading…
Cancel
Save