aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Comment.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Comment.js')
-rw-r--r--vnext/src/ui/Comment.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/vnext/src/ui/Comment.js b/vnext/src/ui/Comment.js
index e8fb2afb..6ba34ff0 100644
--- a/vnext/src/ui/Comment.js
+++ b/vnext/src/ui/Comment.js
@@ -1,14 +1,14 @@
-import { useEffect, useRef, useState } from 'react';
+import { useEffect, useRef, useState } from 'react'
-import MessageInput from './MessageInput';
-import Avatar from './Avatar';
-import { UserLink } from './UserInfo';
-import Button from './Button';
+import MessageInput from './MessageInput'
+import Avatar from './Avatar'
+import { UserLink } from './UserInfo'
+import Button from './Button'
-import { format, embedUrls } from '../utils/embed';
+import { format, embedUrls } from '../utils/embed'
-import { chatItemStyle } from './helpers/BubbleStyle';
-import { useVisitor } from './VisitorContext';
+import { chatItemStyle } from './helpers/BubbleStyle'
+import { useVisitor } from './VisitorContext'
/**
* @param {{
@@ -23,20 +23,20 @@ import { useVisitor } from './VisitorContext';
* @returns import('react').ReactElement
*/
export default function Comment({ msg, draft, active, setActive, onStartEditing, postComment }) {
- const [visitor] = useVisitor();
+ const [visitor] = useVisitor()
/** @type {import('react').MutableRefObject<HTMLDivElement?>} */
- const embedRef = useRef(null);
+ const embedRef = useRef(null)
/** @type {import('react').MutableRefObject<HTMLDivElement?>} */
- const msgRef = useRef(null);
- const [author] = useState(msg.user);
+ const msgRef = useRef(null)
+ const [author] = useState(msg.user)
useEffect(() => {
if (msgRef.current && embedRef.current) {
- embedUrls(msgRef.current.querySelectorAll('a'), embedRef.current);
+ embedUrls(msgRef.current.querySelectorAll('a'), embedRef.current)
if (!embedRef.current.hasChildNodes()) {
- embedRef.current.style.display = 'none';
+ embedRef.current.style.display = 'none'
}
}
- }, []);
+ }, [])
return (
<div style={chatItemStyle(visitor, msg)}>
<div className="msg-header">
@@ -94,11 +94,11 @@ export default function Comment({ msg, draft, active, setActive, onStartEditing,
</div>
}
</div>
- );
+ )
}
/**
* @type {import('react').CSSProperties}
*/
const linkStyle = {
cursor: 'pointer'
-};
+}