Switch to redux and webpack
This commit is contained in:
parent
b247287075
commit
e389454535
97 changed files with 2722 additions and 2656 deletions
16
client/src/js/components/UserListItem.js
Normal file
16
client/src/js/components/UserListItem.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
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);
|
||||
}
|
||||
|
||||
render() {
|
||||
return <p onClick={this.handleClick}>{this.props.user.renderName}</p>;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue