Skip to content

Commit

Permalink
Redirect user to home page when home/launchpad-first is enabled
Browse files Browse the repository at this point in the history
Also enabled it on dev by default since we lose that flag when redirecting through pages
  • Loading branch information
paulopmt1 committed Jan 23, 2025
1 parent 0d1074b commit cd602bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions client/landing/stepper/declarative-flow/site-setup-flow.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import config from '@automattic/calypso-config';
import {
Onboard,
updateLaunchpadSettings,
Expand Down Expand Up @@ -296,6 +297,10 @@ const siteSetupFlow: FlowV1 = {
}

if ( isLaunchpadIntent( intent ) ) {
if ( config.isEnabled( 'home/launchpad-first' ) ) {
return exitFlow( `/home/${ siteId ?? siteSlug }` );
}

initializeLaunchpadState( { siteId, siteSlug } );
const url = getPostFlowUrl( { flow: intent, siteId, siteSlug } );
return exitFlow( url );
Expand Down
2 changes: 1 addition & 1 deletion config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"global-styles/on-personal-plan": false,
"help": true,
"help/gpt-response": true,
"home/launchpad-first": false,
"home/launchpad-first": true,
"home/layout-dev": true,
"hosting-server-settings-enhancements": true,
"hosting/datacenter-picker": true,
Expand Down

0 comments on commit cd602bf

Please sign in to comment.