import React, { memo } from 'react'; import classnames from 'classnames'; import stringToRGB from 'utils/color'; const Message = ({ message, coloredNick, style, onNickClick }) => { const className = classnames('message', { [`message-${message.type}`]: message.type }); if (message.type === 'date') { return (
{message.time} {message.from && ( onNickClick(message.from)} > {message.from} )} {message.content}
); }; export default memo(Message);