diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx index 5b816221f4db76..ebbee54b167d7a 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx @@ -3,18 +3,13 @@ import { useStepPersistedState } from '@automattic/onboarding'; import { withShoppingCart } from '@automattic/shopping-cart'; import { localize } from 'i18n-calypso'; import { isEmpty } from 'lodash'; -import { useRef, useCallback, useEffect } from 'react'; +import { useRef, useCallback } from 'react'; import { connect } from 'react-redux'; import { recordUseYourDomainButtonClick } from 'calypso/components/domains/register-domain-step/analytics'; import { planItem } from 'calypso/lib/cart-values/cart-items'; import CalypsoShoppingCartProvider from 'calypso/my-sites/checkout/calypso-shopping-cart-provider'; import withCartKey from 'calypso/my-sites/checkout/with-cart-key'; import { RenderDomainsStep, submitDomainStepSelection } from 'calypso/signup/steps/domains'; -import { - wasSignupCheckoutPageUnloaded, - retrieveSignupDestination, - getSignupCompleteFlowName, -} from 'calypso/signup/storageUtils'; import { recordTracksEvent } from 'calypso/state/analytics/actions'; import { NON_PRIMARY_DOMAINS_TO_FREE_USERS } from 'calypso/state/current-user/constants'; import { @@ -100,18 +95,6 @@ export default function DomainsStep( props: StepProps ) { }, [ stepState, setStepState ] ); - useEffect( () => { - // This will automatically submit the domains step when navigating back from checkout - // It will redirect the user to plans step. The idea is to achieve the same behavior as /start. - const signupDestinationCookieExists = retrieveSignupDestination(); - const isReEnteringFlow = getSignupCompleteFlowName() === props.flow; - const isManageSiteFlow = Boolean( - wasSignupCheckoutPageUnloaded() && signupDestinationCookieExists && isReEnteringFlow - ); - if ( isManageSiteFlow ) { - props.navigation.submit?.( stepState ); - } - }, [ stepState, props.navigation, props.flow ] ); return ( diff --git a/client/landing/stepper/declarative-flow/onboarding.ts b/client/landing/stepper/declarative-flow/onboarding.ts index 2b77a929a4ca17..f0cb1a221868a9 100644 --- a/client/landing/stepper/declarative-flow/onboarding.ts +++ b/client/landing/stepper/declarative-flow/onboarding.ts @@ -159,7 +159,7 @@ const onboarding: Flow = { } } setSignupCompleteFlowName( flowName ); - return navigate( 'create-site', undefined, true ); + return navigate( 'create-site', undefined, false ); } case 'create-site': return navigate( 'processing', undefined, true );