Skip to content

Commit

Permalink
Domains: Use correct flowName for domain search component (#92097)
Browse files Browse the repository at this point in the history
* Set `flowName` to `domains` once we navigate to `/domains/add/:site`

* Improve notice message
  • Loading branch information
rafaelgallani committed Jun 25, 2024
1 parent 0fb8a0d commit 739c338
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/lib/domains/registration/availability-messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ function getAvailabilityNotice(

case 'gravatar_tld_restriction':
message = translate(
'Gravatar is currently offering free .link domains. Additional domain extensions may become available for a fee in the future.'
'Gravatar is currently offering .link domains. Additional domain extensions may become available for a fee in the future.'
);
severity = 'info';
break;
Expand Down
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 739c338

Please sign in to comment.