2016-08-25 00:56:44 +09:00
|
|
|
import Status from './status';
|
|
|
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
2016-08-31 23:15:12 +09:00
|
|
|
import PureRenderMixin from 'react-addons-pure-render-mixin';
|
2016-08-25 00:56:44 +09:00
|
|
|
|
|
|
|
const StatusList = React.createClass({
|
2016-08-31 23:15:12 +09:00
|
|
|
|
2016-08-25 00:56:44 +09:00
|
|
|
propTypes: {
|
2016-09-01 20:21:48 +09:00
|
|
|
statuses: ImmutablePropTypes.list.isRequired,
|
|
|
|
onReply: React.PropTypes.func,
|
|
|
|
onReblog: React.PropTypes.func,
|
|
|
|
onFavourite: React.PropTypes.func
|
2016-08-25 00:56:44 +09:00
|
|
|
},
|
|
|
|
|
2016-08-31 23:15:12 +09:00
|
|
|
mixins: [PureRenderMixin],
|
|
|
|
|
|
|
|
render () {
|
2016-08-25 00:56:44 +09:00
|
|
|
return (
|
2016-09-06 07:44:28 +09:00
|
|
|
<div style={{ overflowY: 'scroll', flex: '1 1 auto' }} className='scrollable'>
|
2016-08-25 00:56:44 +09:00
|
|
|
<div>
|
|
|
|
{this.props.statuses.map((status) => {
|
2016-09-01 20:21:48 +09:00
|
|
|
return <Status key={status.get('id')} status={status} onReply={this.props.onReply} onReblog={this.props.onReblog} onFavourite={this.props.onFavourite} />;
|
2016-08-25 00:56:44 +09:00
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
2016-08-31 23:15:12 +09:00
|
|
|
|
2016-08-25 00:56:44 +09:00
|
|
|
});
|
|
|
|
|
|
|
|
export default StatusList;
|