aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/bug/Bug.js
diff options
context:
space:
mode:
Diffstat (limited to 'webui/src/bug/Bug.js')
-rw-r--r--webui/src/bug/Bug.js39
1 files changed, 39 insertions, 0 deletions
diff --git a/webui/src/bug/Bug.js b/webui/src/bug/Bug.js
new file mode 100644
index 00000000..33ecdd79
--- /dev/null
+++ b/webui/src/bug/Bug.js
@@ -0,0 +1,39 @@
+import { withStyles } from '@material-ui/core/styles'
+import gql from 'graphql-tag'
+import React from 'react'
+
+import Comment from './Comment'
+
+const styles = theme => ({
+ main: {
+ maxWidth: 600,
+ margin: 'auto',
+ marginTop: theme.spacing.unit * 4
+ }
+})
+
+const Bug = ({bug, classes}) => (
+ <main className={classes.main}>
+
+ {bug.comments.edges.map(({cursor, node}) => (
+ <Comment key={cursor} comment={node}/>
+ ))}
+ </main>
+)
+
+Bug.fragment = gql`
+ fragment Bug on Bug {
+ comments(first: 10) {
+ edges {
+ cursor
+ node {
+ ...Comment
+ }
+ }
+ }
+ }
+
+ ${Comment.fragment}
+`
+
+export default withStyles(styles)(Bug)