<commit_before>const React = require('react');
const { mapChildren } = require('idyll-component-children');
import TextContainer from './text-container';

class Map extends React.Component {
  render() {
    const {
      idyll,
      hasError,
      updateProps,
      children,
      value,
      currentValue
    } = this.props;

    if (children) {
      return mapChildren(children, child => {
        return value.map(val => {
          let newProps = Object.assign({}, child.props);
          newProps = Object.keys(child.props).reduce((props, elm) => {
            if (props[elm] === currentValue) {
              props[elm] = val;
              return props;
            }
            return props;
          }, newProps);
          return (
            <TextContainer>
              <div>
                {React.cloneElement(child, {
                  ...newProps
                })}
              </div>
            </TextContainer>
          );
        });
      });
    }
    return null;
  }
}
<commit_msg>Update Map Component: remove TextContainer<commit_after>const React = require('react');
const { mapChildren } = require('idyll-component-children');
import TextContainer from './text-container';

class Map extends React.Component {
  render() {
    const { children, value, currentValue } = this.props;

    if (children) {
      return mapChildren(children, child => {
        return value.map(val => {
          let newProps = Object.assign({}, child.props);
          newProps = Object.keys(child.props).reduce((props, elm) => {
            if (props[elm] === currentValue) {
              props[elm] = val;
              return props;
            }
            return props;
          }, newProps);
          return React.cloneElement(child, { ...newProps });
        });
      });
    }
    return null;
  }
}

{'fraction_non_alphanumeric': 0.1307901907356948, 'fraction_numerical': 0.0, 'mean_word_length': 1.748502994011976, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, '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': '6629260', 'n_tokens_mistral': 493, 'n_tokens_neox': 487, 'n_words': 109}