aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-11-04 21:30:02 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commitee9f960cdcb3974f5bb9780665deddb9191a9227 (patch)
treee558ac473b7853253fa99d4a20f0f21481d8e036 /vnext/src
parentc895bb0c519e7fc7c24bfb437f08d010cfe28d99 (diff)
Fix comments
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/index.css4
-rw-r--r--vnext/src/ui/Thread.js12
2 files changed, 8 insertions, 8 deletions
diff --git a/vnext/src/index.css b/vnext/src/index.css
index 181bc051..32ef7b26 100644
--- a/vnext/src/index.css
+++ b/vnext/src/index.css
@@ -794,8 +794,8 @@ blockquote {
flex-direction: column;
}
- #content_wrapper {
- display: flex;
+ #replies {
+ width: 640px;
}
#footer {
color: var(--dimmed-link-color);
diff --git a/vnext/src/ui/Thread.js b/vnext/src/ui/Thread.js
index bb02e42e..d00c197e 100644
--- a/vnext/src/ui/Thread.js
+++ b/vnext/src/ui/Thread.js
@@ -55,24 +55,24 @@ export default function Thread(props) {
console.log(ex);
});
}, [hash, message.mid, mid]);
- let onReply = useCallback((json) => {
+ let onReply = (json) => {
const msg = JSON.parse(json.data);
if (msg.mid == message.mid) {
setReplies(oldReplies => {
return [...oldReplies, msg];
});
}
- }, [message]);
+ };
- let postComment = useCallback((template) => {
- const { mid, rid, body, attach } = template;
- let commentAction = editing.rid ? update(mid, editing.rid, body) : comment(mid, rid, body, attach);
+ let postComment = (template) => {
+ const { body, attach } = template;
+ let commentAction = editing.rid ? update(mid, editing.rid, body) : comment(mid, active, body, attach);
commentAction.then(() => {
setEditing(emptyMessage);
loadReplies();
})
.catch(console.log);
- }, [editing.rid, loadReplies]);
+ };
let startEditing = (reply) => {
setActive(reply.replyto);