aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Thread.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-28 15:15:03 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit204f3762eedd8028f7d79826dc625eb31bbcb909 (patch)
tree683fbb0bdc3754f02fd8014cf52d4e26cb8ae1ad /vnext/src/ui/Thread.js
parent6e2f663ef80a784dd9b51fae76b17c042bbb46ee (diff)
Merge `eslint` configuration from Next version
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} />)
}
</>