import React, { PureComponent } from 'react'; export default class Message extends PureComponent { handleSenderClick = () => { const { message, openPrivateChat, select } = this.props; openPrivateChat(message.server, message.from); select(message.server, message.from, true); }; render() { const { message } = this.props; const className = message.type ? `message message-${message.type}` : 'message'; const style = { paddingLeft: `${window.messageIndent + 15}px`, textIndent: `-${window.messageIndent}px`, ...this.props.style }; return (

{message.time} {message.from && {' '}{message.from} }{' '}{message.message}

); } }