aboutsummaryrefslogtreecommitdiffstats
path: root/webui
diff options
context:
space:
mode:
authorSascha <GlancingMind@outlook.com>2021-03-17 11:37:04 +0100
committerSascha <GlancingMind@outlook.com>2021-03-19 17:49:46 +0100
commit26ad5fc379749d7effc324ae36e778ee540053a7 (patch)
tree143079a9562f25d8d23403357d9fd5e93e7af13e /webui
parent2a1c77236c1c601971ab71f076c85529d1d60a72 (diff)
downloadgit-bug-26ad5fc379749d7effc324ae36e778ee540053a7.tar.gz
Add onClick handler to edit button
Diffstat (limited to 'webui')
-rw-r--r--webui/src/pages/bug/Message.tsx6
-rw-r--r--webui/src/pages/bug/MessageCommentFragment.graphql1
-rw-r--r--webui/src/pages/bug/MessageCreateFragment.graphql1
3 files changed, 8 insertions, 0 deletions
diff --git a/webui/src/pages/bug/Message.tsx b/webui/src/pages/bug/Message.tsx
index 6b04059f..390f369e 100644
--- a/webui/src/pages/bug/Message.tsx
+++ b/webui/src/pages/bug/Message.tsx
@@ -70,6 +70,11 @@ type Props = {
function Message({ op }: Props) {
const classes = useStyles();
+
+ const editComment = (id: String) => {
+ console.log(id);
+ };
+
return (
<article className={classes.container}>
<Avatar author={op.author} className={classes.avatar} />
@@ -86,6 +91,7 @@ function Message({ op }: Props) {
disableRipple
className={classes.editButton}
aria-label="edit message"
+ onClick={() => editComment(op.id)}
>
<EditIcon />
</IconButton>
diff --git a/webui/src/pages/bug/MessageCommentFragment.graphql b/webui/src/pages/bug/MessageCommentFragment.graphql
index 00f8342d..337eade0 100644
--- a/webui/src/pages/bug/MessageCommentFragment.graphql
+++ b/webui/src/pages/bug/MessageCommentFragment.graphql
@@ -1,6 +1,7 @@
#import "../../components/fragments.graphql"
fragment AddComment on AddCommentTimelineItem {
+ id
createdAt
...authored
edited
diff --git a/webui/src/pages/bug/MessageCreateFragment.graphql b/webui/src/pages/bug/MessageCreateFragment.graphql
index 4cae819d..81f80afb 100644
--- a/webui/src/pages/bug/MessageCreateFragment.graphql
+++ b/webui/src/pages/bug/MessageCreateFragment.graphql
@@ -1,6 +1,7 @@
#import "../../components/fragments.graphql"
fragment Create on CreateTimelineItem {
+ id
createdAt
...authored
edited