diff options
author | Sascha <GlancingMind@outlook.com> | 2021-03-17 16:04:34 +0100 |
---|---|---|
committer | Sascha <GlancingMind@outlook.com> | 2021-03-19 17:51:58 +0100 |
commit | c874d111f50dc129a1ac8210beff626eea2f2186 (patch) | |
tree | dd20f6374e900ae209638914d47244adde9e41d1 /webui/src/pages/bug/Message.tsx | |
parent | 0cd5c84d59d00141bb997346f538b165644d233c (diff) | |
download | git-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.tsx | 12 |
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> ); } |