From 9fb033ef191a23b1338e0fdfe8ab1f462165b99d Mon Sep 17 00:00:00 2001
From: Sascha <GlancingMind@outlook.com>
Date: Wed, 17 Mar 2021 22:28:45 +0100
Subject: Return of new comment works...

...but the types are quite hacky
---
 webui/src/pages/bug/Message.tsx | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'webui/src/pages/bug/Message.tsx')

diff --git a/webui/src/pages/bug/Message.tsx b/webui/src/pages/bug/Message.tsx
index 08a55dc6..7455104b 100644
--- a/webui/src/pages/bug/Message.tsx
+++ b/webui/src/pages/bug/Message.tsx
@@ -78,7 +78,6 @@ function Message({ bug, op: comment }: Props) {
 
   const editComment = (id: String) => {
     switchToEditMode(true);
-    console.log(id);
   };
 
   function readMessageView() {
@@ -118,13 +117,18 @@ function Message({ bug, op: comment }: Props) {
       switchToEditMode(false);
     };
 
+    const onPostSubmit = (comments: AddCommentFragment | CreateFragment) => {
+      console.log('posted: ' + comments.message);
+      switchToEditMode(false);
+    };
+
     return (
       <div className={classes.bubble}>
         <EditCommentForm
           bug={bug}
           onCancelClick={cancelEdition}
           // Close edit view after submitted changes
-          onPostSubmit={cancelEdition}
+          onPostSubmit={onPostSubmit}
           comment={comment}
         />
       </div>
-- 
cgit 

