2015-12-28 23:34:32 +00:00
|
|
|
import React, { Component } from 'react';
|
|
|
|
import pure from 'pure-render-decorator';
|
|
|
|
|
|
|
|
@pure
|
|
|
|
export default class UserListItem extends Component {
|
|
|
|
handleClick = () => {
|
|
|
|
const { tab, user, openPrivateChat, select } = this.props;
|
|
|
|
|
|
|
|
openPrivateChat(tab.server, user.nick);
|
|
|
|
select(tab.server, user.nick, true);
|
2016-01-06 23:28:11 +00:00
|
|
|
};
|
2015-12-28 23:34:32 +00:00
|
|
|
|
|
|
|
render() {
|
|
|
|
return <p onClick={this.handleClick}>{this.props.user.renderName}</p>;
|
|
|
|
}
|
|
|
|
}
|