mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-14 17:51:44 +03:00
Remove BackToList button from NewBugPage
This commit is contained in:
parent
f752dd5480
commit
50f146a42a
@ -4,7 +4,6 @@ import { useHistory } from 'react-router-dom';
|
|||||||
import { Button, Paper } from '@material-ui/core';
|
import { Button, Paper } from '@material-ui/core';
|
||||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||||
|
|
||||||
import BackToListButton from '../../components/BackToListButton';
|
|
||||||
import BugTitleInput from '../../components/BugTitleForm/BugTitleInput';
|
import BugTitleInput from '../../components/BugTitleForm/BugTitleInput';
|
||||||
import CommentInput from '../../components/CommentInput/CommentInput';
|
import CommentInput from '../../components/CommentInput/CommentInput';
|
||||||
|
|
||||||
@ -15,17 +14,12 @@ import { useNewBugMutation } from './NewBug.generated';
|
|||||||
*/
|
*/
|
||||||
const useStyles = makeStyles((theme: Theme) => ({
|
const useStyles = makeStyles((theme: Theme) => ({
|
||||||
main: {
|
main: {
|
||||||
maxWidth: 1200,
|
maxWidth: 800,
|
||||||
margin: 'auto',
|
margin: 'auto',
|
||||||
marginTop: theme.spacing(4),
|
marginTop: theme.spacing(4),
|
||||||
marginBottom: theme.spacing(4),
|
marginBottom: theme.spacing(4),
|
||||||
padding: theme.spacing(2),
|
padding: theme.spacing(2),
|
||||||
},
|
overflow: 'hidden',
|
||||||
container: {
|
|
||||||
display: 'flex',
|
|
||||||
marginBottom: theme.spacing(1),
|
|
||||||
marginRight: theme.spacing(2),
|
|
||||||
marginLeft: theme.spacing(2),
|
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -39,21 +33,6 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|||||||
backgroundColor: theme.palette.success.main,
|
backgroundColor: theme.palette.success.main,
|
||||||
color: theme.palette.success.contrastText,
|
color: theme.palette.success.contrastText,
|
||||||
},
|
},
|
||||||
leftSidebar: {
|
|
||||||
marginTop: theme.spacing(4),
|
|
||||||
marginRight: theme.spacing(2),
|
|
||||||
},
|
|
||||||
rightSidebar: {
|
|
||||||
marginTop: theme.spacing(2),
|
|
||||||
flex: '0 0 200px',
|
|
||||||
},
|
|
||||||
timeline: {
|
|
||||||
flex: 1,
|
|
||||||
marginTop: theme.spacing(2),
|
|
||||||
marginRight: theme.spacing(2),
|
|
||||||
minWidth: 400,
|
|
||||||
padding: theme.spacing(1),
|
|
||||||
},
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,12 +72,7 @@ function NewBugPage() {
|
|||||||
if (error) return <div>Error</div>;
|
if (error) return <div>Error</div>;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className={classes.main}>
|
<Paper className={classes.main}>
|
||||||
<div className={classes.container}>
|
|
||||||
<div className={classes.leftSidebar}>
|
|
||||||
<BackToListButton />
|
|
||||||
</div>
|
|
||||||
<Paper className={classes.timeline}>
|
|
||||||
<form className={classes.form} onSubmit={submitNewIssue}>
|
<form className={classes.form} onSubmit={submitNewIssue}>
|
||||||
<BugTitleInput
|
<BugTitleInput
|
||||||
inputRef={(node) => {
|
inputRef={(node) => {
|
||||||
@ -119,16 +93,13 @@ function NewBugPage() {
|
|||||||
className={classes.greenButton}
|
className={classes.greenButton}
|
||||||
variant="contained"
|
variant="contained"
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={!isFormValid()}
|
disabled={isFormValid() ? false : true}
|
||||||
>
|
>
|
||||||
Submit new issue
|
Submit new issue
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</Paper>
|
</Paper>
|
||||||
<div className={classes.rightSidebar} />
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user