<commit_before>import React, {Component} from 'react';
import { connect } from 'react-redux';


class WeatherList extends Component {
  render() {
    return(
      <table className="table table-hover">
        <thead>
          <tr>
            <th>City</th>
            <th>Temperature</th>
            <th>Pressure</th>
            <th>Humidity</th>
          </tr>
        </thead>
        <tbody>

        </tbody>
      </table>
    )
  }
}


function mapStateToProps(weather) {
  return { weather };
}

export default connect(mapStateToProps)(WeatherList);<commit_msg>makes list working for city name<commit_after>import React, {Component} from 'react';
import { connect } from 'react-redux';


class WeatherList extends Component {
  constructor(props) {
    super(props);
  }
  renderWeather(cityData) {
    const name = cityData.city.name;
    return(
      <tr key={name}>
        <td>{name}</td>
      </tr>
    )
  }

  render() {
    return(
      <table className="table table-hover">
        <thead>
          <tr>
            <th>City</th>
            <th>Temperature</th>
            <th>Pressure</th>
            <th>Humidity</th>
          </tr>
        </thead>
        <tbody>
          { this.props.weather.map(this.renderWeather) }
        </tbody>
      </table>
    )
  }
}


function mapStateToProps({weather}) {
  return { weather };
}

export default connect(mapStateToProps)(WeatherList);
{'fraction_non_alphanumeric': 0.14104372355430184, 'fraction_numerical': 0.0, 'mean_word_length': 2.0581896551724137, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '6320361', 'n_tokens_mistral': 460, 'n_tokens_neox': 441, 'n_words': 88}