diff options
Diffstat (limited to 'webui/src/pages/bug/Bug.tsx')
-rw-r--r-- | webui/src/pages/bug/Bug.tsx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx index 8d6d11cc..d85c5296 100644 --- a/webui/src/pages/bug/Bug.tsx +++ b/webui/src/pages/bug/Bug.tsx @@ -1,32 +1,28 @@ import React from 'react'; -import Typography from '@material-ui/core/Typography/Typography'; import { makeStyles } from '@material-ui/core/styles'; -import Author from 'src/components/Author'; -import Date from 'src/components/Date'; +import BugTitleForm from 'src/components/BugTitleForm/BugTitleForm'; +import IfLoggedIn from 'src/components/IfLoggedIn/IfLoggedIn'; import Label from 'src/components/Label'; -import IfLoggedIn from 'src/layout/IfLoggedIn'; import { BugFragment } from './Bug.generated'; import CommentForm from './CommentForm'; import TimelineQuery from './TimelineQuery'; +/** + * Css in JS Styles + */ const useStyles = makeStyles((theme) => ({ main: { maxWidth: 1000, margin: 'auto', marginTop: theme.spacing(4), + overflow: 'hidden', }, header: { marginLeft: theme.spacing(3) + 40, - }, - title: { - ...theme.typography.h5, - }, - id: { - ...theme.typography.subtitle1, - marginLeft: theme.spacing(1), + marginRight: theme.spacing(2), }, container: { display: 'flex', @@ -73,17 +69,11 @@ type Props = { function Bug({ bug }: Props) { const classes = useStyles(); + return ( <main className={classes.main}> <div className={classes.header}> - <span className={classes.title}>{bug.title}</span> - <span className={classes.id}>{bug.humanId}</span> - - <Typography color={'textSecondary'}> - <Author author={bug.author} /> - {' opened this bug '} - <Date date={bug.createdAt} /> - </Typography> + <BugTitleForm bug={bug} /> </div> <div className={classes.container}> @@ -92,7 +82,7 @@ function Bug({ bug }: Props) { <IfLoggedIn> {() => ( <div className={classes.commentForm}> - <CommentForm bugId={bug.id} /> + <CommentForm bug={bug} /> </div> )} </IfLoggedIn> |