Skip to content

Commit af7dc43

Browse files
committed
change back button in the ai site builder flow domain step
1 parent 9db49db commit af7dc43

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

client/signup/steps/domains/index.jsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { PLAN_PERSONAL } from '@automattic/calypso-products';
22
import page from '@automattic/calypso-router';
33
import { Spinner } from '@automattic/components';
44
import { isWithThemeFlow, isHostingSignupFlow, isOnboardingFlow } from '@automattic/onboarding';
5-
import { isTailoredSignupFlow } from '@automattic/onboarding/src';
5+
import { isAIBuilderFlow, isTailoredSignupFlow } from '@automattic/onboarding/src';
66
import { withShoppingCart } from '@automattic/shopping-cart';
77
import clsx from 'clsx';
88
import { localize } from 'i18n-calypso';
@@ -1379,6 +1379,9 @@ export class RenderDomainsStep extends Component {
13791379
} else if ( isOnboardingFlow( flowName ) && !! goBack ) {
13801380
backUrl = null;
13811381
backLabelText = translate( 'Back' );
1382+
} else if ( isAIBuilderFlow( flowName ) ) {
1383+
backUrl = `${ siteUrl }/wp-admin/site-editor.php?canvas=edit&referrer=${ flowName }&p=%2F&ai-step=edit`;
1384+
backLabelText = translate( 'Keep Editing' );
13821385
} else {
13831386
backUrl = getStepUrl( flowName, stepName, null, this.getLocale() );
13841387

packages/onboarding/src/utils/flows.ts

+4
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,7 @@ export const isDIFMFlow = ( flowName: string | null ) => {
141141
flowName && [ DIFM_FLOW, DIFM_FLOW_STORE, WEBSITE_DESIGN_SERVICES ].includes( flowName )
142142
);
143143
};
144+
145+
export const isAIBuilderFlow = ( flowName: string | null ) => {
146+
return Boolean( flowName && [ AI_SITE_BUILDER_FLOW ].includes( flowName ) );
147+
};

0 commit comments

Comments
 (0)