-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Goals first: Enable back button in the login step for the DIFM and Im…
…port flows (#97722) * Accept back_url query parameter in signup/user * Accept back_url query parameter in setup/hosted-site-migration * Add back_url to DIFM and hosted-site-migration flows * Move back_url conciliation within redux connect function * Update implementation so it uses back_to instead of back_url * Push back button to the right so it doesn't conflict with the WP Logo * Update unit tests
- Loading branch information
Showing
6 changed files
with
43 additions
and
7 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
client/landing/stepper/declarative-flow/hosted-site-migration-flow.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
import { HOSTED_SITE_MIGRATION_FLOW } from '@automattic/onboarding'; | ||
import { useSearchParams } from 'react-router-dom'; | ||
import { type Flow } from './internals/types'; | ||
import siteMigration from './site-migration-flow'; | ||
|
||
const hostedSiteMigrationFlow: Flow = { | ||
...siteMigration, | ||
variantSlug: HOSTED_SITE_MIGRATION_FLOW, | ||
isSignupFlow: true, | ||
useLoginParams() { | ||
const [ searchParams ] = useSearchParams(); | ||
const backTo = searchParams.get( 'back_to' ); | ||
|
||
return { | ||
extraQueryParams: { | ||
...( backTo ? { back_to: backTo } : {} ), | ||
}, | ||
}; | ||
}, | ||
}; | ||
|
||
export default hostedSiteMigrationFlow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters