aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/bug/Bug.tsx
diff options
context:
space:
mode:
authorLuke Granger-Brown <git@lukegb.com>2020-06-18 02:52:33 +0100
committerMichael Muré <batolettre@gmail.com>2020-06-27 22:56:10 +0200
commit4a28f25347addf05708cdff37ecace4139f01779 (patch)
tree145e5fd420f70b182d66a5824d76300b5307d509 /webui/src/pages/bug/Bug.tsx
parent23228101a2a38a139f6fc2cafc18e9f08d911089 (diff)
downloadgit-bug-4a28f25347addf05708cdff37ecace4139f01779.tar.gz
Add support for read-only mode for web UI.
Fixes #402.
Diffstat (limited to 'webui/src/pages/bug/Bug.tsx')
-rw-r--r--webui/src/pages/bug/Bug.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx
index 1bc128dd..99b9bddd 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 ReadonlyHidden from 'src/layout/ReadonlyHidden';
import { BugFragment } from './Bug.generated';
import CommentForm from './CommentForm';
@@ -88,9 +89,11 @@ 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>
+ <ReadonlyHidden>
+ <div className={classes.commentForm}>
+ <CommentForm bugId={bug.id} />
+ </div>
+ </ReadonlyHidden>
</div>
<div className={classes.sidebar}>
<span className={classes.sidebarTitle}>Labels</span>