Skip to content

Commit

Permalink
Default header copy
Browse files Browse the repository at this point in the history
  • Loading branch information
escapemanuele committed Jan 2, 2024
1 parent 9d714ce commit 98e7e82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 6 additions & 11 deletions client/blocks/login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ class Login extends Component {
isP2Login,
isPartnerSignup,
isSignupExistingAccount,
isSocialFirst,
isWhiteLogin,
isWoo,
isWooCoreProfilerFlow,
Expand All @@ -343,14 +342,10 @@ class Login extends Component {
wccomFrom,
} = this.props;

let headerText = translate( 'Log in to your account' );
let headerText = translate( 'Log in to WordPress.com' );
let preHeader = null;
let postHeader = null;

if ( isSocialFirst ) {
headerText = translate( 'Log in to WordPress.com' );
}

if ( isManualRenewalImmediateLoginAttempt ) {
headerText = translate( 'Log in to update your payment details and renew your subscription' );
}
Expand Down Expand Up @@ -604,10 +599,10 @@ class Login extends Component {
);
}

renderToS() {
const { isSocialFirst, translate, twoFactorEnabled } = this.props;
renderSubheaderToS() {
const { translate, twoFactorEnabled } = this.props;

if ( ! isSocialFirst || twoFactorEnabled ) {
if ( twoFactorEnabled ) {
return null;
}

Expand Down Expand Up @@ -820,7 +815,7 @@ class Login extends Component {
}

render() {
const { isJetpack, oauth2Client, locale } = this.props;
const { isSocialFirst, isJetpack, oauth2Client, locale } = this.props;

return (
<div
Expand All @@ -835,7 +830,7 @@ class Login extends Component {

{ this.renderNotice() }

{ this.renderToS() }
{ isSocialFirst && this.renderSubheaderToS() }

{ this.renderContent() }

Expand Down
2 changes: 1 addition & 1 deletion client/login/wp-login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export class Login extends Component {

const loginButtons = (
<>
{ isSocialFirst && isWhiteLogin && (
{ isSocialFirst && (
<LoginButtons
locale={ locale }
twoFactorAuthType={ twoFactorAuthType }
Expand Down

0 comments on commit 98e7e82

Please sign in to comment.