import React from 'react' import PropTypes from 'prop-types' import ImmutablePureComponent from 'react-immutable-pure-component' import ImmutablePropTypes from 'react-immutable-proptypes' import { DEFAULT_REL } from '../constants' import Button from './button' import RelativeTimestamp from './relative_timestamp' import Text from './text' import Image from './image' class NewsItem extends ImmutablePureComponent { render() { const { news } = this.props if (!news) return null const title = news.get('title') const url = news.get('url') if (!title || !url) return null return ( ) } } NewsItem.propTypes = { news: ImmutablePropTypes.map, } export default NewsItem