aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Thread.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Thread.js')
-rw-r--r--vnext/src/ui/Thread.js11
1 files changed, 4 insertions, 7 deletions
diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js
index 52a2baf1..20ea0a3c 100644
--- a/vnext/src/ui/Thread.js
+++ b/vnext/src/ui/Thread.js
@@ -7,11 +7,9 @@ import MessageInput from './MessageInput';
import Spinner from './Spinner';
import { getMessages, comment, update } from '../api';
-
-import './Thread.css';
/**
- * @type import('../api').Message
- */
+ * @type import('../api').Message
+ */
const emptyMessage = {};
/**
@@ -29,7 +27,7 @@ export default function Thread(props) {
const [active, setActive] = useState(0);
const [editing, setEditing] = useState(emptyMessage);
- const [hash, setHash] = useState(props.visitor.hash);
+ const [hash] = useState(props.visitor.hash);
const { mid } = params;
let loadReplies = useCallback(() => {
@@ -67,7 +65,7 @@ export default function Thread(props) {
let postComment = useCallback((template) => {
const { mid, rid, body, attach } = template;
let commentAction = editing.rid ? update(mid, editing.rid, body) : comment(mid, rid, body, attach);
- commentAction.then(res => {
+ commentAction.then(() => {
setEditing(emptyMessage);
loadReplies();
})
@@ -116,7 +114,6 @@ export default function Thread(props) {
)) : (
<>
{
- // @ts-ignore
Array(loaders).fill().map((it, i) => <Spinner key={i} />)
}
</>