Skip to content

Commit

Permalink
Domains Step: Fix missing back button on new user signup (#94043)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyip authored Sep 3, 2024
1 parent 3391dd4 commit 15b416b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions client/signup/steps/domains/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,17 @@ export class RenderDomainsStep extends Component {
let backLabelText;
let isExternalBackUrl = false;

// Hide "Back" button in domains step if the user has no sites.
const shouldHideBack = ! userSiteCount && previousStepName?.startsWith( 'user' );
/**
* Hide "Back" button in domains step if:
* 1. The user has no sites
* 2. This step was rendered immediately after account creation
* 3. The user is on the root domains step and not a child step section like use-your-domain
*/
const shouldHideBack =
! userSiteCount &&
previousStepName?.startsWith( 'user' ) &&
stepSectionName !== 'use-your-domain';

const hideBack = flowName === 'domain' || shouldHideBack;

const previousStepBackUrl = this.getPreviousStepUrl();
Expand Down

0 comments on commit 15b416b

Please sign in to comment.