* Fix multiple chat loading bug * Open profile links in chat via new tab * Add unmount handling for chat * Add overscroll property to chat * Add channel_name to ChatChannel model * Create route and page for chatroom WIP * Expose ChatChannel id to live page * Implement multichannel support WIP * Implement chatroom page WIP * Add css for chatroom * Update chat's moderation * Refactor chat's message type * Swap the use of :message_markdown & :message_html * Add channel permissions WIP * Fix failing specs * Adjust json reponses * Add empty message prevention * Update participant error message * Change Workshop channel to General
23 lines
573 B
JavaScript
23 lines
573 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__message" style={errorStyle}>
|
|
{'Sorry '}
|
|
<span className="chatmessage__currentuser">
|
|
{`@${window.currentUser.username}`}
|
|
</span>
|
|
{` ${message}`}
|
|
</span>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ErrorMessage.propTypes = {
|
|
message: PropTypes.string.isRequired,
|
|
};
|
|
|
|
export default ErrorMessage;
|