* Fix spacing * Update webpacker gem to 3.5 * Add custom preact-compact config * Add babel-loader to resolve a weird issue * Add react-textarea-autocomplete * Move 2 dependencies into devDependencies * Add babel-eslint & eslint-plugin-babel * Refactor chat * Add fixed width to chat's channels * Add timestamp for chat * Fix long word issue * Add showTimestamp options to chat * Add profile image to chat * Make profile image in chat circle * Improve message send logic * Add proper user session handling for chat * Choose profile user image source for chat * Adjust user's text color * Fix lint
23 lines
574 B
JavaScript
23 lines
574 B
JavaScript
import { h } from 'preact';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const ErrorMessage = ({ message }) => {
|
|
const errorStyle = { color: 'darksalmon', 'font-size': '13px' };
|
|
return (
|
|
<div className="chatmessage">
|
|
<span className="chatmessage__body" style={errorStyle}>
|
|
{'Sorry '}
|
|
<span className="chatmessagebody__currentuser">
|
|
{`@${window.currentUser.username}`}
|
|
</span>
|
|
{` ${message}`}
|
|
</span>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ErrorMessage.propTypes = {
|
|
message: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default ErrorMessage;
|