import { forwardRef } from 'react'; import Avatar from '../Avatar'; import { MESSAGE_TYPE } from './conversationModels'; import Alert from './../assets/alert.svg'; const ConversationBubble = forwardRef< HTMLDivElement, { message: string; type: MESSAGE_TYPE; className: string; } >(function ConversationBubble({ message, type, className }, ref) { return (
{type === 'ERROR' && ( alert )}

{message}

); }); export default ConversationBubble; // TODO : split question and answer into two diff JSX