mirror of https://framagit.org/tykayn/mastodon.git
44 lines
961 B
JavaScript
44 lines
961 B
JavaScript
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
import { mockContactList } from './mockContactList';
|
|
import Contact from './Contact';
|
|
import ConversationItem from './conversation-item';
|
|
|
|
const following = mockContactList;
|
|
|
|
export default class ConversationStack extends React.Component {
|
|
|
|
static propTypes = {
|
|
following: PropTypes.array,
|
|
// conversations: PropTypes.array,
|
|
};
|
|
|
|
static defaultProps = {
|
|
following: following,
|
|
};
|
|
|
|
openConversationWith(account) {
|
|
console.log('openConversationWith name', account.username);
|
|
}
|
|
|
|
render() {
|
|
|
|
return this.props.following.map(elem =>
|
|
|
|
(<li className='user-item'>
|
|
<div className='conversation-box'>
|
|
<div
|
|
className='conversation-header'
|
|
onClick={this.openConversationWith(elem)}
|
|
>
|
|
<Contact account={elem} />
|
|
</div >
|
|
<ConversationItem />
|
|
</div >
|
|
</li >),
|
|
);
|
|
};
|
|
|
|
}
|