File size: 1,139 Bytes
1e92f2d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | import { STEPS } from 'calypso/landing/stepper/declarative-flow/internals/steps';
import {
Flow,
ProvidedDependencies,
} from 'calypso/landing/stepper/declarative-flow/internals/types';
import { stepsWithRequiredLogin } from '../../../utils/steps-with-required-login';
const DOMAIN_USER_TRANSFER_STEPS = stepsWithRequiredLogin( [ STEPS.DOMAIN_CONTACT_INFO ] );
const domainUserTransfer: Flow = {
name: 'domain-user-transfer',
isSignupFlow: false,
useSteps() {
return DOMAIN_USER_TRANSFER_STEPS;
},
__experimentalUseBuiltinAuth: true,
useStepNavigation( currentStep, navigate ) {
function submit( providedDependencies: ProvidedDependencies = {} ) {
switch ( currentStep ) {
case 'domain-contact-info':
return window.location.assign(
`/checkout/domain-transfer-to-any-user/thank-you/${ providedDependencies.domain }`
);
}
return providedDependencies;
}
const goBack = () => {
return;
};
const goNext = () => {
return;
};
const goToStep = ( step: string ) => {
navigate( step );
};
return { goNext, goBack, goToStep, submit };
},
};
export default domainUserTransfer;
|