<commit_before>import React from 'react';
import { Accounts } from 'meteor/accounts-base';
import { T9n } from 'meteor/softwarerero:accounts-t9n';

export class PasswordOrService extends React.Component {
  render () {
    let {
      oauthServices = {},
      className,
      style = {}
    } = this.props;
    let labels = Object.keys(oauthServices).map(service => oauthServices[service].label);
    if (labels.length > 2) {
      labels = [];
    }

    if (labels.length) {
      return (
        <div style={ style } className={ className }>
          { `${T9n.get('or use')} ${ labels.join(' / ') }` }
        </div>
      );
    }
    return null;
  }
}

Accounts.ui.PasswordOrService = PasswordOrService;<commit_msg>Bugfix, the PasswordOrService text did not show.<commit_after>import React from 'react';
import { Accounts } from 'meteor/accounts-base';
import { T9n } from 'meteor/softwarerero:accounts-t9n';
import { hasPasswordService } from '../../helpers.js';

export class PasswordOrService extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      hasPasswordService: hasPasswordService()
    };
  }

  render () {
    let {
      oauthServices = {},
      className,
      style = {}
    } = this.props;
    let { hasPasswordService } = this.state;
    let labels = Object.keys(oauthServices).map(service => oauthServices[service].label);
    if (labels.length > 2) {
      labels = [];
    }

    if (hasPasswordService) {
      return (
        <div style={ style } className={ className }>
          { `${T9n.get('or use')} ${ labels.join(' / ') }` }
        </div>
      );
    }
    return null;
  }
}

Accounts.ui.PasswordOrService = PasswordOrService;
{'fraction_non_alphanumeric': 0.14686951433586892, 'fraction_numerical': 0.004681100058513751, 'mean_word_length': 2.6774193548387095, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6260724', 'n_tokens_mistral': 548, 'n_tokens_neox': 533, 'n_words': 111}