From 94eb88bdd3054ffcf96c1471c76d7ebf53f569ca Mon Sep 17 00:00:00 2001 From: en Date: Thu, 30 Jan 2025 14:28:42 +0100 Subject: [PATCH] fix(comments): clear input on publish --- src/utils/comments.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/comments.ts b/src/utils/comments.ts index 3a7a8d0..74c4438 100644 --- a/src/utils/comments.ts +++ b/src/utils/comments.ts @@ -66,6 +66,7 @@ export function handleCommentSubmit( return newCommentEvents }) }, 15000) + return true } else { log(true, LogType.Error, 'Publishing reply failed.') setCommentEvents((prev) => { @@ -81,8 +82,8 @@ export function handleCommentSubmit( setVisible(newCommentEvents) return newCommentEvents }) + return false } - return false } catch (error) { toast.error('An error occurred in publishing reply.') log(true, LogType.Error, 'An error occurred in publishing reply.', error)