aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/PM.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-31 22:48:30 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit8887e1b51565b992f34c955c459125eb85b28483 (patch)
tree7fc8130f523014864e2d60aa9628e7a7ee7e7dd5 /vnext/src/ui/PM.js
parentfc96a9a206a825171da87a7f23cc2ea16b1d645d (diff)
`useVisitor` hook
Diffstat (limited to 'vnext/src/ui/PM.js')
-rw-r--r--vnext/src/ui/PM.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/vnext/src/ui/PM.js b/vnext/src/ui/PM.js
index 8885153d..d5a7eff1 100644
--- a/vnext/src/ui/PM.js
+++ b/vnext/src/ui/PM.js
@@ -3,9 +3,11 @@ import { memo } from 'react';
import Avatar from './Avatar';
import { format } from '../utils/embed';
import { chatItemStyle } from './helpers/BubbleStyle';
+import { useVisitor } from './VisitorContext';
function PM(props) {
- const { chat, visitor } = props;
+ const { chat } = props;
+ const [visitor] = useVisitor();
return (
<li>
<div style={chatItemStyle(visitor, chat)}>
@@ -21,7 +23,6 @@ function PM(props) {
export default memo(PM);
/*
PM.propTypes = {
- chat: MessageType.isRequired,
- visitor: UserType.isRequired
+ chat: MessageType.isRequired
};
*/