import React, {Component, PropTypes} from "react";
import HalfWidthFeedEntry from "./HalfWidthFeedEntry";

export default class HalfWidthFeedEntryList extends Component {

  static propTypes = {
    entries: PropTypes.array.isRequired,
    currentEntry: PropTypes.object,
    // todos: PropTypes.arrayOf(PropTypes.shape({
    //   text: PropTypes.string.isRequired,
    //   completed: PropTypes.bool.isRequired
    // }).isRequired).isRequired
    onEntryClick: PropTypes.func.isRequired
  };

  render() {
    const { onEntryClick, currentEntry } = this.props;

    return (
      <div className="half-width-item-list">
        {this.props.entries.map(function(entry, i) {
          let isSelected = (entry && currentEntry && entry.guid === currentEntry.guid) || false;
          return (
            <HalfWidthFeedEntry
              entry={entry}
              isSelected={isSelected}
              key={i}
              onClick={() => onEntryClick(entry)} />);
        })}
      </div>
    );
  }
}

@@ -220,55 +220,167 @@
 rray
-.isRequired,%0A    currentEntry: PropTypes.object
+Of(PropTypes.shape(%7B%0A      id: PropTypes.string.isRequired%0A    %7D)).isRequired,%0A    currentEntry: PropTypes.shape(%7B%0A      id: PropTypes.string.isRequired%0A    %7D)
 ,%0A  
@@ -839,18 +839,16 @@
 & entry.
-gu
 id === c
@@ -863,10 +863,8 @@
 try.
-gu
 id) 

fix selection handling