<commit_before>/* global django */
const React = require('react')

class PlansList extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      searchResults: null,
      address: null,
      selected: null,
      displayError: false,
      displayResults: false,
      filters: {
        status: -1,
        participation: -1,
        district: -1
      }
    }
  }

  bindList (element) {
    this.listElement = element
  }

  componentDidMount () {

  }

  componentDidUpdate (prevProps, prevState) {
    if (prevState.selected !== this.state.selected || prevState.filters !== this.state.filters) {
      // filter markers
      this.props.items.forEach((item, i) => {
        if (item.point !== '') {
          if (!this.isInFilter(item)) {
            this.setMarkerFiltered(i)
          } else if (i === this.state.selected) {
            this.setMarkerSelected(i, item)
          } else {
            this.setMarkerDefault(i, item)
          }
        }
      })
    }
  }

  renderListItem (item, i) {
    let itemClass = 'list-item list-item--squashed'
    if (i === this.state.selected) {
      itemClass += ' selected'
    }<commit_msg>refactor PlansList (remove stuff that is not needed)<commit_after>/* global django */
const React = require('react')

class PlansList extends React.Component {
  bindList (element) {
    this.listElement = element
  }
  renderListItem (item, i) {
    let itemClass = 'list-item list-item--squashed'
{'fraction_non_alphanumeric': 0.12804878048780488, 'fraction_numerical': 0.0020325203252032522, 'mean_word_length': 2.2749445676274944, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2223298', 'n_tokens_mistral': 452, 'n_tokens_neox': 439, 'n_words': 102}