import React from 'react';
import { Link } from 'react-router-dom';
import CommentsContainer from '../comments/comments_container';
class NewsFeedIndexItem extends React.Component{
constructor(props){
super(props);
this.handleSubmit = this.handleSubmit.bind(this);
}
handleSubmit(e){
this.props.deletePost(this.props.post.id)
.then(()=>this.props.fetchNewsFeed());
}
renderImage(){
if(this.props.post.photo.match( '/assets/missing-post')){
return null ;
}else{
return (