blob: a25580e53c14eaaeb494fb9746dcb78e60d4d21a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import React from 'react';
import Avatar from './Avatar';
import { format } from '../utils/embed';
import { bubbleStyle, chatItemStyle } from './helpers/BubbleStyle';
function PM(props) {
const { chat } = props;
return (
<li>
<div style={chatItemStyle(props.visitor, chat)}>
<Avatar user={chat.user} />
<div style={bubbleStyle(props.visitor, chat)}>
<p dangerouslySetInnerHTML={{ __html: format(chat.body, 0, false) }} />
</div>
</div>
</li>
);
}
export default React.memo(PM);
/*
PM.propTypes = {
chat: MessageType.isRequired,
visitor: UserType.isRequired
};
*/
|