<commit_before>import Component from 'react-pure-render/component';
import React, { PropTypes } from 'react';
import Todo from './Todo.react';
import todosMessages from '../../common/todos/todosMessages';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { deleteTodo, toggleTodoCompleted } from '../../common/todos/actions';

// Container component.
export class Todos extends Component {

  static propTypes = {
    deleteTodo: PropTypes.func.isRequired,
    todos: PropTypes.object.isRequired,
    filter: PropTypes.object.isRequired
  };

  render() {
    const { deleteTodo, todos, toggleTodoCompleted, filter } = this.props;

    if (!todos.size) {
      return <p><FormattedMessage {...todosMessages.empty} /></p>;
    }

    var selectedFilter = filter.get('selectedFilter');

    const list = todos.toList().sortBy(item => item.createdAt).reverse().filter(item => selectedFilter === null? item : item.status === selectedFilter);



    return (
      <ol className="todos">
        {
          list.map(todo =>
          {
            if (todo.status !== 'delete')
            {
              return (
                <Todo
                  deleteTodo={deleteTodo}
                  todo={todo}
                  toggleTodoCompleted={toggleTodoCompleted}
                  key={todo.id}
                  selectedFilter={selectedFilter}
                />
              );
            }
          }
        )
      }
      </ol>
    );
  }<commit_msg>fixed the issue for the deleted items<commit_after>import Component from 'react-pure-render/component';
import React, { PropTypes } from 'react';
import Todo from './Todo.react';
import todosMessages from '../../common/todos/todosMessages';
import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';
import { deleteTodo, toggleTodoCompleted } from '../../common/todos/actions';

// Container component.
export class Todos extends Component {

  static propTypes = {
    deleteTodo: PropTypes.func.isRequired,
    todos: PropTypes.object.isRequired,
    filter: PropTypes.object.isRequired
  };

  render() {
    const { deleteTodo, todos, toggleTodoCompleted, filter } = this.props;

    if (!todos.size) {
      return <p><FormattedMessage {...todosMessages.empty} /></p>;
    }

    var selectedFilter = filter.get('selectedFilter');

    const list = todos.toList().sortBy(item => item.createdAt).reverse().filter(item => selectedFilter === null? item : item.status === selectedFilter);



    return (
      <ol className="todos">
        {
          list.map(todo =>
          {
            if (todo.status !== 'delete' || selectedFilter === 'delete')
            {
              return (
                <Todo
                  deleteTodo={deleteTodo}
                  todo={todo}
                  toggleTodoCompleted={toggleTodoCompleted}
                  key={todo.id}
                  selectedFilter={selectedFilter}
                />
              );
            }
          }
        )
      }
      </ol>
    );
  }
{'fraction_non_alphanumeric': 0.13091740124061377, 'fraction_numerical': 0.0, 'mean_word_length': 2.085599194360524, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, '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': '7637837', 'n_tokens_mistral': 864, 'n_tokens_neox': 846, 'n_words': 178}