diff options
Diffstat (limited to 'vnext/src/ui/Comment.js')
-rw-r--r-- | vnext/src/ui/Comment.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vnext/src/ui/Comment.js b/vnext/src/ui/Comment.js index 756b3487..45c80187 100644 --- a/vnext/src/ui/Comment.js +++ b/vnext/src/ui/Comment.js @@ -9,6 +9,7 @@ import MessageInput from './MessageInput'; import { fetchUserUri } from '../api'; import { chatItemStyle } from './helpers/BubbleStyle'; import { format, embedUrls } from '../utils/embed'; +import { useVisitor } from './VisitorContext'; let isMounted; @@ -16,16 +17,16 @@ let isMounted; * @param {{ msg: import('../api').Message, draft: string, - visitor: import('../api').User, active: number, setActive: function, onStartEditing: function, postComment: function }} props */ -export default function Comment({ msg, draft, visitor, active, setActive, onStartEditing, postComment }) { +export default function Comment({ msg, draft, active, setActive, onStartEditing, postComment }) { const embedRef = useRef(); const msgRef = useRef(); + const [visitor] = useVisitor(); const [author, setAuthor] = useState(msg.user); useEffect(() => { if (msgRef.current) { |