feat: renamed stages components to match redux slices
setup stage, trying to fix back button position, moved out start logic from stagespull/3056/head
parent
7d14efb073
commit
eff53a956c
@ -0,0 +1,51 @@
|
||||
import { useDispatch } from 'react-redux';
|
||||
import {
|
||||
AccountCreation,
|
||||
AccountRestoration,
|
||||
Onboarding,
|
||||
setAccountCreationStep,
|
||||
setAccountRestorationStep,
|
||||
setOnboardingStep,
|
||||
} from '../../../state/onboarding/ducks/registration';
|
||||
import { SessionButton, SessionButtonColor } from '../../basic/SessionButton';
|
||||
import { SpacerLG } from '../../basic/Text';
|
||||
import { TermsAndConditions } from '../TermsAndConditions';
|
||||
|
||||
export const Start = () => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
return (
|
||||
<>
|
||||
<SessionButton
|
||||
buttonColor={SessionButtonColor.White}
|
||||
onClick={() => {
|
||||
dispatch(setAccountCreationStep(AccountCreation.SessionIDShown));
|
||||
dispatch(setOnboardingStep(Onboarding.CreateAccount));
|
||||
}}
|
||||
text={window.i18n('createAccount')}
|
||||
/>
|
||||
<SpacerLG />
|
||||
<SessionButton
|
||||
buttonColor={SessionButtonColor.White}
|
||||
onClick={() => {
|
||||
dispatch(setOnboardingStep(Onboarding.RestoreAccount));
|
||||
dispatch(setAccountRestorationStep(AccountRestoration.RecoveryPassword));
|
||||
}}
|
||||
text={window.i18n('restoreUsingRecoveryPhrase')}
|
||||
dataTestId="restore-using-recovery"
|
||||
/>
|
||||
<SpacerLG />
|
||||
<SessionButton
|
||||
buttonColor={SessionButtonColor.White}
|
||||
onClick={() => {
|
||||
dispatch(setOnboardingStep(Onboarding.RestoreAccount));
|
||||
dispatch(setAccountRestorationStep(AccountRestoration.LinkDevice));
|
||||
}}
|
||||
text={window.i18n('linkDevice')}
|
||||
dataTestId="link-device"
|
||||
/>
|
||||
<SpacerLG />
|
||||
<TermsAndConditions />
|
||||
</>
|
||||
);
|
||||
};
|
@ -1,4 +1,5 @@
|
||||
import { SignUpTab } from './create/SignUpTab';
|
||||
import { SignInTab } from './restore/SignInTab';
|
||||
import { CreateAccount } from './CreatAccount';
|
||||
import { RestoreAccount } from './RestoreAccount';
|
||||
import { Start } from './Start';
|
||||
|
||||
export { SignInTab, SignUpTab };
|
||||
export { CreateAccount, RestoreAccount, Start };
|
||||
|
Loading…
Reference in New Issue