From 204f3762eedd8028f7d79826dc625eb31bbcb909 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 28 Oct 2022 15:15:03 +0300 Subject: Merge `eslint` configuration from Next version --- vnext/src/ui/Thread.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'vnext/src/ui/Thread.js') 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) => ) } -- cgit v1.2.3