aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug/Message.tsx
diff options
context:
space:
mode:
authorSascha <GlancingMind@outlook.com>2021-03-17 16:04:34 +0100
committerSascha <GlancingMind@outlook.com>2021-03-19 17:51:58 +0100
commitc874d111f50dc129a1ac8210beff626eea2f2186 (patch)
treedd20f6374e900ae209638914d47244adde9e41d1 /webui/src/pages/bug/Message.tsx
parent0cd5c84d59d00141bb997346f538b165644d233c (diff)
downloadgit-bug-c874d111f50dc129a1ac8210beff626eea2f2186.tar.gz
Create EditCommentForm and handle cancle button
Diffstat (limited to 'webui/src/pages/bug/Message.tsx')
-rw-r--r--webui/src/pages/bug/Message.tsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/webui/src/pages/bug/Message.tsx b/webui/src/pages/bug/Message.tsx
index 4ad68b44..928e256f 100644
--- a/webui/src/pages/bug/Message.tsx
+++ b/webui/src/pages/bug/Message.tsx
@@ -12,7 +12,7 @@ import Date from 'src/components/Date';
import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn';
import { BugFragment } from './Bug.generated';
-import CommentForm from './CommentForm';
+import EditCommentForm from './EditCommentForm';
import { AddCommentFragment } from './MessageCommentFragment.generated';
import { CreateFragment } from './MessageCreateFragment.generated';
@@ -114,9 +114,17 @@ function Message({ bug, op }: Props) {
}
function editMessageView() {
+ const cancleEdition = () => {
+ switchToEditMode(false);
+ };
+
return (
<div className={classes.bubble}>
- <CommentForm bug={bug} />
+ <EditCommentForm
+ bug={bug}
+ onCancleClick={cancleEdition}
+ commentId={op.id}
+ />
</div>
);
}