aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2020-06-18 18:44:52 +0100
committerMichael Muré <batolettre@gmail.com>2020-06-27 22:58:21 +0200
commitcf67c78823bd1e7591c2199d51aa3f3fffed73c4 (patch)
tree4c2d07f0780a61bcde5f3e47c3ebaa2785fec64f /webui/src/pages/bug
parentdfdb5e090b9368d336cb7552c8c462bef243fbb0 (diff)
downloadgit-bug-cf67c78823bd1e7591c2199d51aa3f3fffed73c4.tar.gz
Refactor webui changes.
Don't use contexts, just raw Apollo, since it's cached anyway. Change "ReadonlyHidden" to "IfLoggedIn".
Diffstat (limited to 'webui/src/pages/bug')
-rw-r--r--webui/src/pages/bug/Bug.tsx6
-rw-r--r--webui/src/pages/bug/CommentForm.graphql4
2 files changed, 4 insertions, 6 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx
index 99b9bddd..7057f5a1 100644
--- a/webui/src/pages/bug/Bug.tsx
+++ b/webui/src/pages/bug/Bug.tsx
@@ -6,7 +6,7 @@ import { makeStyles } from '@material-ui/core/styles';
import Author from 'src/components/Author';
import Date from 'src/components/Date';
import Label from 'src/components/Label';
-import ReadonlyHidden from 'src/layout/ReadonlyHidden';
+import IfLoggedIn from 'src/layout/IfLoggedIn';
import { BugFragment } from './Bug.generated';
import CommentForm from './CommentForm';
@@ -89,11 +89,11 @@ function Bug({ bug }: Props) {
<div className={classes.container}>
<div className={classes.timeline}>
<TimelineQuery id={bug.id} />
- <ReadonlyHidden>
+ <IfLoggedIn>
<div className={classes.commentForm}>
<CommentForm bugId={bug.id} />
</div>
- </ReadonlyHidden>
+ </IfLoggedIn>
</div>
<div className={classes.sidebar}>
<span className={classes.sidebarTitle}>Labels</span>
diff --git a/webui/src/pages/bug/CommentForm.graphql b/webui/src/pages/bug/CommentForm.graphql
index f4b61850..33d21193 100644
--- a/webui/src/pages/bug/CommentForm.graphql
+++ b/webui/src/pages/bug/CommentForm.graphql
@@ -1,7 +1,5 @@
mutation AddComment($input: AddCommentInput!) {
addComment(input: $input) {
- operation {
- id
- }
+ operation { id }
}
}