2016-08-24 15:56:44 +00:00
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2016-08-24 19:08:00 +00:00
|
|
|
import Avatar from './avatar';
|
|
|
|
import DisplayName from './display_name';
|
|
|
|
import RelativeTimestamp from './relative_timestamp';
|
2016-08-24 15:56:44 +00:00
|
|
|
|
|
|
|
const Status = React.createClass({
|
|
|
|
propTypes: {
|
|
|
|
status: ImmutablePropTypes.map.isRequired
|
|
|
|
},
|
|
|
|
|
2016-08-24 19:08:00 +00:00
|
|
|
render () {
|
2016-08-24 17:23:37 +00:00
|
|
|
var content = { __html: this.props.status.get('content') };
|
2016-08-24 19:08:00 +00:00
|
|
|
var status = this.props.status;
|
2016-08-24 15:56:44 +00:00
|
|
|
|
|
|
|
return (
|
2016-08-25 17:52:55 +00:00
|
|
|
<div style={{ padding: '8px 10px', display: 'flex', flexDirection: 'row', borderBottom: '1px solid #363c4b', cursor: 'pointer' }}>
|
2016-08-24 19:08:00 +00:00
|
|
|
<Avatar src={status.getIn(['account', 'avatar'])} />
|
|
|
|
|
|
|
|
<div style={{ flex: '1 1 auto', marginLeft: '10px' }}>
|
|
|
|
<div style={{ overflow: 'hidden' }}>
|
|
|
|
<div style={{ float: 'right' }}>
|
|
|
|
<a href={status.get('url')} style={{ textDecoration: 'none' }}><RelativeTimestamp timestamp={status.get('created_at')} /></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<DisplayName account={status.get('account')} />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className='status__content' dangerouslySetInnerHTML={content} style={{ fontSize: '14px' }} />
|
|
|
|
</div>
|
2016-08-24 15:56:44 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export default Status;
|