aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-06-27 23:09:22 +0200
committerGitHub <noreply@github.com>2020-06-27 23:09:22 +0200
commitc0dbc149d5c0c3610476ba14a800c9ba803a2c2c (patch)
treec07587da30eae7a37c2597d110ef1e66be3b4b8f /webui/src/pages/bug
parent23228101a2a38a139f6fc2cafc18e9f08d911089 (diff)
parent3aaf775857d186ad416133935e73ed1b063938c6 (diff)
downloadgit-bug-c0dbc149d5c0c3610476ba14a800c9ba803a2c2c.tar.gz
Merge pull request #407 from lukegb/fix-402
Add support for read-only mode for web UI.
Diffstat (limited to 'webui/src/pages/bug')
-rw-r--r--webui/src/pages/bug/Bug.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx
index 1bc128dd..34a3aa26 100644
--- a/webui/src/pages/bug/Bug.tsx
+++ b/webui/src/pages/bug/Bug.tsx
@@ -6,6 +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 IfLoggedIn from 'src/layout/IfLoggedIn';
import { BugFragment } from './Bug.generated';
import CommentForm from './CommentForm';
@@ -88,9 +89,13 @@ function Bug({ bug }: Props) {
<div className={classes.container}>
<div className={classes.timeline}>
<TimelineQuery id={bug.id} />
- <div className={classes.commentForm}>
- <CommentForm bugId={bug.id} />
- </div>
+ <IfLoggedIn>
+ {() => (
+ <div className={classes.commentForm}>
+ <CommentForm bugId={bug.id} />
+ </div>
+ )}
+ </IfLoggedIn>
</div>
<div className={classes.sidebar}>
<span className={classes.sidebarTitle}>Labels</span>