From 8ef4dc10ab6a50f3fdd4b2da4693327c0ca620b3 Mon Sep 17 00:00:00 2001 From: Philip Jackson Date: Tue, 17 Dec 2024 16:47:02 +1300 Subject: [PATCH] Remove design picker from site-setup flow --- .../stepper/declarative-flow/site-setup-flow.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/landing/stepper/declarative-flow/site-setup-flow.ts b/client/landing/stepper/declarative-flow/site-setup-flow.ts index cca741b4bcaec..6aba1b6ffac20 100644 --- a/client/landing/stepper/declarative-flow/site-setup-flow.ts +++ b/client/landing/stepper/declarative-flow/site-setup-flow.ts @@ -40,14 +40,16 @@ function isLaunchpadIntent( intent: string ) { return intent === SiteIntent.Write || intent === SiteIntent.Build; } +function useGoalsAtFrontExperimentQueryParam() { + return Boolean( useSelector( getInitialQueryArguments )?.[ 'goals-at-front-experiment' ] ); +} + const siteSetupFlow: Flow = { name: 'site-setup', isSignupFlow: false, useSteps() { - const isGoalsAtFrontExperiment = Boolean( - useSelector( getInitialQueryArguments )?.[ 'goals-at-front-experiment' ] - ); + const isGoalsAtFrontExperiment = useGoalsAtFrontExperimentQueryParam(); const steps = [ STEPS.GOALS, @@ -78,9 +80,7 @@ const siteSetupFlow: Flow = { ]; if ( isGoalsAtFrontExperiment ) { - // The user has already seen the goals step in the `onboarding` flow - // TODO Ensure that DESIGN_CHOICES is at the front if the user is Big Sky eligible - steps.splice( 0, 4 ); + return [ STEPS.PROCESSING, STEPS.ERROR ]; } return steps;