aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/pages/bug')
-rw-r--r--webui/src/pages/bug/Message.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/webui/src/pages/bug/Message.tsx b/webui/src/pages/bug/Message.tsx
index 7455104b..adb3057c 100644
--- a/webui/src/pages/bug/Message.tsx
+++ b/webui/src/pages/bug/Message.tsx
@@ -72,9 +72,10 @@ type Props = {
op: AddCommentFragment | CreateFragment;
};
-function Message({ bug, op: comment }: Props) {
+function Message({ bug, op }: Props) {
const classes = useStyles();
const [editMode, switchToEditMode] = useState(false);
+ const [comment, setComment] = useState(op);
const editComment = (id: String) => {
switchToEditMode(true);
@@ -117,8 +118,8 @@ function Message({ bug, op: comment }: Props) {
switchToEditMode(false);
};
- const onPostSubmit = (comments: AddCommentFragment | CreateFragment) => {
- console.log('posted: ' + comments.message);
+ const onPostSubmit = (comment: AddCommentFragment | CreateFragment) => {
+ setComment(comment);
switchToEditMode(false);
};