diff options
author | Cláudio Silva <claudio.engdist@gmail.com> | 2021-02-02 15:23:23 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-02 15:23:23 -0300 |
commit | fd8d11030b7cb1ddf772e72dd60dcc054560ef11 (patch) | |
tree | 3a5b9b45ecb3bf5d013a7b77a3afd0b375df4bdd /webui/src/pages | |
parent | a005c179cb974d70a0211e7f17db36523be9ba97 (diff) | |
parent | abb005e1d5a97c960dd81af5d678092fe1a3ec49 (diff) | |
download | git-bug-fd8d11030b7cb1ddf772e72dd60dcc054560ef11.tar.gz |
Merge pull request #1 from claudioantonio/webui_535
Webui 535
Diffstat (limited to 'webui/src/pages')
-rw-r--r-- | webui/src/pages/bug/Bug.tsx | 26 | ||||
-rw-r--r-- | webui/src/pages/new/NewBugPage.tsx | 5 |
2 files changed, 9 insertions, 22 deletions
diff --git a/webui/src/pages/bug/Bug.tsx b/webui/src/pages/bug/Bug.tsx index 8d6d11cc..f2a116f8 100644 --- a/webui/src/pages/bug/Bug.tsx +++ b/webui/src/pages/bug/Bug.tsx @@ -1,10 +1,8 @@ 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 Label from 'src/components/Label'; import IfLoggedIn from 'src/layout/IfLoggedIn'; @@ -12,21 +10,19 @@ 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}> diff --git a/webui/src/pages/new/NewBugPage.tsx b/webui/src/pages/new/NewBugPage.tsx index 8e06706f..c70cddaa 100644 --- a/webui/src/pages/new/NewBugPage.tsx +++ b/webui/src/pages/new/NewBugPage.tsx @@ -64,9 +64,6 @@ function NewBugPage() { function submitNewIssue(e: FormEvent) { e.preventDefault(); if (!isFormValid()) return; - console.log('submitNewISsue'); - console.log('title: ', issueTitle); - console.log('comment: ', issueComment); newBug({ variables: { input: { @@ -82,7 +79,7 @@ function NewBugPage() { return issueTitle.length > 0 && issueComment.length > 0 ? true : false; } - if (loading) return <div>Loading</div>; + if (loading) return <div>Loading...</div>; if (error) return <div>Error</div>; return ( |