Skip to content

Commit

Permalink
Simpilify document head title
Browse files Browse the repository at this point in the history
  • Loading branch information
escapemanuele committed Sep 30, 2024
1 parent 730b701 commit 649d35b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions client/landing/stepper/declarative-flow/internals/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import {
isNewsletterOrLinkInBioFlow,
isSenseiFlow,
isWooExpressFlow,
} from '@automattic/onboarding';
import { isWooExpressFlow } from '@automattic/onboarding';
import { useSelect } from '@wordpress/data';
import { useI18n } from '@wordpress/react-i18n';
import { useTranslate } from 'i18n-calypso';
import React, { useEffect, lazy } from 'react';
import Modal from 'react-modal';
import { generatePath, useParams } from 'react-router';
Expand Down Expand Up @@ -76,7 +71,6 @@ export const FlowRenderer: React.FC< { flow: Flow } > = ( { flow } ) => {
const currentStepRoute = params.step || '';
const isLoggedIn = useSelector( isUserLoggedIn );
const { lang = null } = useParams();
const translate = useTranslate();

// Start tracking performance for this step.
useStartStepperPerformanceTracking( params.flow || '', currentStepRoute );
Expand Down Expand Up @@ -191,13 +185,7 @@ export const FlowRenderer: React.FC< { flow: Flow } > = ( { flow } ) => {
};

const getDocumentHeadTitle = () => {
if ( isNewsletterOrLinkInBioFlow( flow.name ) ) {
return flow.title;
} else if ( isSenseiFlow( flow.name ) ) {
return __( 'Course Creator' );
}

return flow.title ?? translate( 'Create a site' );
return flow.title ?? __( 'Create a site' );
};

useSignUpStartTracking( { flow } );
Expand Down

0 comments on commit 649d35b

Please sign in to comment.