Skip to content

Commit

Permalink
Set flowName to domains once we navigate to /domains/add/:site
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelgallani committed Jun 25, 2024
1 parent 30e511b commit 1ec3ae3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions client/my-sites/domains/controller.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ const domainSearch = ( context, next ) => {
<DomainSearch
basePath={ sectionify( context.path ) }
context={ context }
isAddNewDomainContext={ context.path.includes( 'domains/add' ) }
domainAndPlanUpsellFlow={
context.query.domainAndPlanPackage !== undefined
? context.query.domainAndPlanPackage === 'true'
Expand Down
6 changes: 6 additions & 0 deletions client/my-sites/domains/domain-search/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import getCurrentQueryArguments from 'calypso/state/selectors/get-current-query-
import getCurrentRoute from 'calypso/state/selectors/get-current-route';
import isSiteOnMonthlyPlan from 'calypso/state/selectors/is-site-on-monthly-plan';
import isSiteUpgradeable from 'calypso/state/selectors/is-site-upgradeable';
import { setCurrentFlowName } from 'calypso/state/signup/flow/actions';
import { getDomainsBySiteId } from 'calypso/state/sites/domains/selectors';
import {
isSiteOnECommerceTrial,
Expand Down Expand Up @@ -121,6 +122,10 @@ class DomainSearch extends Component {
}
this.checkSiteIsUpgradeable();

if ( this.props.isAddNewDomainContext ) {
this.props.setCurrentFlowName( 'domains' );
}

this.isMounted = true;
}

Expand Down Expand Up @@ -449,5 +454,6 @@ export default connect(
{
recordAddDomainButtonClick,
recordRemoveDomainButtonClick,
setCurrentFlowName,
}
)( withCartKey( withShoppingCart( localize( DomainSearch ) ) ) );

0 comments on commit 1ec3ae3

Please sign in to comment.