import React from 'react' import PropTypes from 'prop-types' import ColorManager from '../../../ide/colors/ColorManager' import MessageContent from './message-content' function Message({ message, userId }) { function hue(user) { return user ? ColorManager.getHueForUserId(user.id) : 0 } function getMessageStyle(user) { return { borderColor: `hsl(${hue(user)}, 85%, 40%)`, backgroundColor: `hsl(${hue(user)}, 85%, 40%` } } function getArrowStyle(user) { return { borderColor: `hsl(${hue(user)}, 85%, 40%)` } } const isMessageFromSelf = message.user ? message.user.id === userId : false return (