<commit_before>/**
 *
 * TableDelete
 *
 */

import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';

import styles from './styles.scss';

function TableDelete({ colspan, number, onToggleDeleteAll }) {
  const suffix = number > 1 ? 'plural' : 'singular';

  return (
    <tr className={styles.tableDelete}>
      <td colSpan={colspan + 1}>
        <FormattedMessage
          id={`content-manager.components.TableDelete.entries.${suffix}`}
          values={{ number }}
        >
          {message => <span className={styles.tableDeleteSpan}>{message}</span>}
        </FormattedMessage>
        <FormattedMessage
          id="content-manager.components.TableDelete.delete"
        >
          {message => <span className={styles.deleteAll} onClick={onToggleDeleteAll}>{message}</span>}
        </FormattedMessage>
      </td>
    </tr>
  );
}

TableDelete.defaultProps = {
  colspan: 0,
  number: [],
};

TableDelete.propTypes = {
  colspan: PropTypes.number,
  number: PropTypes.number,
  onToggleDeleteAll: PropTypes.func.isRequired,
};

export default TableDelete;<commit_msg>Fix PR feedback<commit_after>/**
 *
 * TableDelete
 *
 */

import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';

import styles from './styles.scss';

function TableDelete({ colspan, number, onToggleDeleteAll }) {
  const suffix = number > 1 ? 'plural' : 'singular';

  return (
    <tr className={styles.tableDelete}>
      <td colSpan={colspan + 1}>
        <FormattedMessage
          id={`content-manager.components.TableDelete.entries.${suffix}`}
          values={{ number }}
        >
          {message => <span className={styles.tableDeleteSpan}>{message}</span>}
        </FormattedMessage>
        <FormattedMessage
          id="content-manager.components.TableDelete.delete"
        >
          {message => <span className={styles.deleteAll} onClick={onToggleDeleteAll}>{message}</span>}
        </FormattedMessage>
      </td>
    </tr>
  );
}

TableDelete.defaultProps = {
  colspan: 0,
};

TableDelete.propTypes = {
  colspan: PropTypes.number,
  number: PropTypes.number.isRequired,
  onToggleDeleteAll: PropTypes.func.isRequired,
};

export default TableDelete;
{'fraction_non_alphanumeric': 0.14222809335094672, 'fraction_numerical': 0.002642007926023778, 'mean_word_length': 3.2230483271375463, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 33, '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': '5714371', 'n_tokens_mistral': 673, 'n_tokens_neox': 669, 'n_words': 132}