<commit_before>import React from 'react';
import Table from 'grommet/components/Table';
import TableRow from 'grommet/components/TableRow';
import { injectIntl } from 'react-intl';
import unitMessages from 'i18n/unit';

class DbxUnitTable extends React.Component {

   render() {
      return (
         <Table>
            <thead>
               <tr>
                  <th>{this.props.intl.formatMessage(unitMessages.name)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.role)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.move)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.strength)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.speed)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.skill)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.armor)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.abilities)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.stranger_cost)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.ally_cost)}</th>
                  <th>{this.props.intl.formatMessage(unitMessages.friend_cost)}</th>
               </tr>
            </thead>
            <tbody>
               {this.props.source.map(function(object, i){
                  return <TableRow key={i}>
                           <td>{object.name}</td>
                           <td>{object.role}</td>
                           <td>{object.move}</td>
                           <td>{object.strength}</td>
                           <td>{object.speed}</td>
                           <td>{object.skill}</td>
                           <td>{object.armor}</td>
                           <td>{object.abilities}</td>
                           <td>{object.stranger_cost}</td>
                           <td>{object.ally_cost}</td>
                           <td>{object.friend_cost}</td>
                        </TableRow>;
               })}
            </tbody>
         </Table>
      );
   }
}

export default injectIntl(DbxUnitTable);<commit_msg>The table is now created with a lambda<commit_after>import React from 'react';
import Table from 'grommet/components/Table';
import TableRow from 'grommet/components/TableRow';
import { injectIntl } from 'react-intl';
import unitMessages from 'i18n/unit';

class DbxUnitTable = (props) => {
   return (
      <Table>
         <thead>
            <tr>
               <th>{props.intl.formatMessage(unitMessages.name)}</th>
               <th>{props.intl.formatMessage(unitMessages.role)}</th>
               <th>{props.intl.formatMessage(unitMessages.move)}</th>
               <th>{props.intl.formatMessage(unitMessages.strength)}</th>
               <th>{props.intl.formatMessage(unitMessages.speed)}</th>
               <th>{props.intl.formatMessage(unitMessages.skill)}</th>
               <th>{props.intl.formatMessage(unitMessages.armor)}</th>
               <th>{props.intl.formatMessage(unitMessages.abilities)}</th>
               <th>{props.intl.formatMessage(unitMessages.stranger_cost)}</th>
               <th>{props.intl.formatMessage(unitMessages.ally_cost)}</th>
               <th>{props.intl.formatMessage(unitMessages.friend_cost)}</th>
            </tr>
         </thead>
         <tbody>
            {props.source.map(function(object, i){
               return <TableRow key={i}>
                        <td>{object.name}</td>
                        <td>{object.role}</td>
                        <td>{object.move}</td>
                        <td>{object.strength}</td>
                        <td>{object.speed}</td>
                        <td>{object.skill}</td>
                        <td>{object.armor}</td>
                        <td>{object.abilities}</td>
                        <td>{object.stranger_cost}</td>
                        <td>{object.ally_cost}</td>
                        <td>{object.friend_cost}</td>
                     </TableRow>;
            })}
         </tbody>
      </Table>
   );
}

export default injectIntl(DbxUnitTable);
{'fraction_non_alphanumeric': 0.14748549323017407, 'fraction_numerical': 0.0009671179883945841, 'mean_word_length': 1.625, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 112, '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': '7580549', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1143, 'n_words': 134}