diff options
Diffstat (limited to 'vnext/src/ui/PM.js')
-rw-r--r-- | vnext/src/ui/PM.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vnext/src/ui/PM.js b/vnext/src/ui/PM.js index a25580e5..9903b4e5 100644 --- a/vnext/src/ui/PM.js +++ b/vnext/src/ui/PM.js @@ -2,16 +2,16 @@ import React from 'react'; import Avatar from './Avatar'; import { format } from '../utils/embed'; -import { bubbleStyle, chatItemStyle } from './helpers/BubbleStyle'; +import { chatItemStyle } from './helpers/BubbleStyle'; function PM(props) { - const { chat } = props; + const { chat, visitor } = props; return ( <li> - <div style={chatItemStyle(props.visitor, chat)}> + <div style={chatItemStyle(visitor, chat)}> <Avatar user={chat.user} /> - <div style={bubbleStyle(props.visitor, chat)}> - <p dangerouslySetInnerHTML={{ __html: format(chat.body, 0, false) }} /> + <div className={visitor.uid === chat.user.uid ? 'msg-bubble msg-bubble-my' : 'msg-bubble'}> + <p dangerouslySetInnerHTML={{ __html: format(chat.body, '0', false) }} /> </div> </div> </li> |