dispatch/client/src/js/components/UserListItem.js
2017-02-17 01:46:39 +01:00

15 lines
378 B
JavaScript

import React, { PureComponent } from 'react';
export default class UserListItem extends PureComponent {
handleClick = () => {
const { tab, user, openPrivateChat, select } = this.props;
openPrivateChat(tab.server, user.nick);
select(tab.server, user.nick, true);
};
render() {
return <p onClick={this.handleClick}>{this.props.user.renderName}</p>;
}
}