<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import NumberCell from './NumberCell';

export default function DemandCell({ projectMedia }) {
  const { demand } = projectMedia.list_columns_values;
  let value = demand;
  if (projectMedia.is_secondary) {
    value = projectMedia.requests_count;
  }
  return <NumberCell value={value} />;
}
DemandCell.propTypes = {
  projectMedia: PropTypes.shape({
    is_secondary: PropTypes.bool.isRequired,
    requests_count: PropTypes.number.isRequired,
    list_columns_values: PropTypes.shape({
      demand: PropTypes.number, // or null/undefined
    }).isRequired,
  }).isRequired,
};<commit_msg>CHECK-632: show demand count instead of requests_count for secondary items (#863)<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import NumberCell from './NumberCell';

export default function DemandCell({ projectMedia }) {
  const { demand } = projectMedia.list_columns_values;
  return <NumberCell value={demand} />;
}
DemandCell.propTypes = {
  projectMedia: PropTypes.shape({
    list_columns_values: PropTypes.shape({
      demand: PropTypes.number, // or null/undefined
    }).isRequired,
  }).isRequired,
};
{'fraction_non_alphanumeric': 0.11788953009068426, 'fraction_numerical': 0.00494641384995878, 'mean_word_length': 4.699530516431925, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5901108', 'n_tokens_mistral': 347, 'n_tokens_neox': 349, 'n_words': 89}