import ImmutablePropTypes from 'react-immutable-proptypes'; import Avatar from './avatar'; import RelativeTimestamp from './relative_timestamp'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import IconButton from './icon_button'; const Status = React.createClass({ propTypes: { status: ImmutablePropTypes.map.isRequired, onReply: React.PropTypes.func, onFavourite: React.PropTypes.func, onReblog: React.PropTypes.func }, mixins: [PureRenderMixin], handleReplyClick () { this.props.onReply(this.props.status); }, handleFavouriteClick () { this.props.onFavourite(this.props.status); }, handleReblogClick () { this.props.onReblog(this.props.status); }, render () { var content = { __html: this.props.status.get('content') }; var status = this.props.status; return (
{status.getIn(['account', 'display_name'])} @{status.getIn(['account', 'acct'])}
); } }); export default Status;