<commit_before>/**
 * Copyright (c) 2017-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

const React = require('react');

const CompLibrary = require('../../core/CompLibrary.js');
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;

const translate = require('../../server/translate.js').translate;
const translation = require('../../server/translation.js');
const backers = require(process.cwd() + '/backers.json');

const siteConfig = require(process.cwd() + '/siteConfig.js');

class Button extends React.Component {
  render() {
    return (
      <div className="pluginWrapper buttonWrapper">
        <a className="button" href={this.props.href} target={this.props.target}>
          {this.props.children}
        </a>
      </div>
    );
  }
}

Button.defaultProps = {
  target: '_self',
};

class Contributors extends React.Component {
  render() {
    return (
      <div>
        <h2>
          <translate>Sponsors</translate>
        </h2>
        <p>
          <translate>
            Sponsors are those who contribute $100 or more per month to Jest
          </translate>
        </p>
        <div>
          {backers.filter(b => b.tier === 'sponsor').map(b => (
            <a
              key={b.id}
              className="sponsor-item"
              title={`$${b.totalDonations / 100} by ${b.name || b.slug}`}
              target="_blank"
              href={b.website || `https://opencollective.com/${b.slug}`}
            >
              {
                <img
                  className="sponsor-avatar"
                  src={b.avatar}
                  alt={
                    b.name || b.slug ? `${b.name || b.slug}'s avatar` : 'avatar'
                  }
                />
              }
            </a>
          ))}
        </div>
        <div className="support">
          <a
            className="support-button"
            href="https://opencollective.com/webpack#support"
          >
            <translate>Become a sponsor</translate>
          </a>
        </div>
        <h2>
          <translate>Backers</translate>
        </h2>
        <p>
          <translate>
            Backers are those who contribute $2 or more per month to Jest
          </translate>
        </p>
        <div>
          {backers.filter(b => b.tier === 'backer').map(b => (
            <a
              key={b.id}
              className="backer-item"
              title={`$${b.totalDonations / 100} by ${b.name || b.slug}`}
              target="_blank"
              href={b.website || `https://opencollective.com/${b.slug}`}
            >
              {
                <img
                  className="backer-avatar"
                  src={b.avatar}
                  alt={
                    b.name || b.slug ? `${b.name || b.slug}'s avatar` : 'avatar'
                  }
                />
              }
            </a>
          ))}
          <div>
            <a
              className="support-button"
              href="https://opencollective.com/webpack#support"
            ><commit_msg>Fix open collective link (#6571)<commit_after>/**
 * Copyright (c) 2017-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

const React = require('react');

const CompLibrary = require('../../core/CompLibrary.js');
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;

const translate = require('../../server/translate.js').translate;
const translation = require('../../server/translation.js');
const backers = require(process.cwd() + '/backers.json');

const siteConfig = require(process.cwd() + '/siteConfig.js');

class Button extends React.Component {
  render() {
    return (
      <div className="pluginWrapper buttonWrapper">
        <a className="button" href={this.props.href} target={this.props.target}>
          {this.props.children}
        </a>
      </div>
    );
  }
}

Button.defaultProps = {
  target: '_self',
};

class Contributors extends React.Component {
  render() {
    return (
      <div>
        <h2>
          <translate>Sponsors</translate>
        </h2>
        <p>
          <translate>
            Sponsors are those who contribute $100 or more per month to Jest
          </translate>
        </p>
        <div>
          {backers.filter(b => b.tier === 'sponsor').map(b => (
            <a
              key={b.id}
              className="sponsor-item"
              title={`$${b.totalDonations / 100} by ${b.name || b.slug}`}
              target="_blank"
              href={b.website || `https://opencollective.com/${b.slug}`}
            >
              {
                <img
                  className="sponsor-avatar"
                  src={b.avatar}
                  alt={
                    b.name || b.slug ? `${b.name || b.slug}'s avatar` : 'avatar'
                  }
                />
              }
            </a>
          ))}
        </div>
        <div className="support">
          <a
            className="support-button"
            href="https://opencollective.com/jest#support"
          >
            <translate>Become a sponsor</translate>
          </a>
        </div>
        <h2>
          <translate>Backers</translate>
        </h2>
        <p>
          <translate>
            Backers are those who contribute $2 or more per month to Jest
          </translate>
        </p>
        <div>
          {backers.filter(b => b.tier === 'backer').map(b => (
            <a
              key={b.id}
              className="backer-item"
              title={`$${b.totalDonations / 100} by ${b.name || b.slug}`}
              target="_blank"
              href={b.website || `https://opencollective.com/${b.slug}`}
            >
              {
                <img
                  className="backer-avatar"
                  src={b.avatar}
                  alt={
                    b.name || b.slug ? `${b.name || b.slug}'s avatar` : 'avatar'
                  }
                />
              }
            </a>
          ))}
          <div>
            <a
              className="support-button"
              href="https://opencollective.com/jest#support"
            >
{'fraction_non_alphanumeric': 0.144524650591307, 'fraction_numerical': 0.006143449546920596, 'mean_word_length': 1.4527306967984934, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 87, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2101801', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1823, 'n_words': 388}