aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/components/CloseBugWithCommentButton
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-03-01 20:57:43 +0100
committerGitHub <noreply@github.com>2022-03-01 20:57:43 +0100
commit2dbe0fd5fc3f3f74848df9499cddf32663e771ee (patch)
treefa162059dd8732ab3d6b22fb6df1fa10a353985f /webui/src/components/CloseBugWithCommentButton
parent08e00b4eb8f8cf8e614cae8dee46862a398f465d (diff)
parent8229e80d1eeee73bd4eab46c90d9f97f802ab063 (diff)
downloadgit-bug-2dbe0fd5fc3f3f74848df9499cddf32663e771ee.tar.gz
Merge pull request #750 from MichaelMure/sandhose/webui-upgrade
Upgrade webui dependencies
Diffstat (limited to 'webui/src/components/CloseBugWithCommentButton')
-rw-r--r--webui/src/components/CloseBugWithCommentButton/CloseBugWithComment.graphql1
-rw-r--r--webui/src/components/CloseBugWithCommentButton/index.tsx25
2 files changed, 6 insertions, 20 deletions
diff --git a/webui/src/components/CloseBugWithCommentButton/CloseBugWithComment.graphql b/webui/src/components/CloseBugWithCommentButton/CloseBugWithComment.graphql
index eb736f53..66c84c35 100644
--- a/webui/src/components/CloseBugWithCommentButton/CloseBugWithComment.graphql
+++ b/webui/src/components/CloseBugWithCommentButton/CloseBugWithComment.graphql
@@ -8,4 +8,3 @@ mutation AddCommentAndCloseBug($input: AddCommentAndCloseBugInput!) {
}
}
}
-
diff --git a/webui/src/components/CloseBugWithCommentButton/index.tsx b/webui/src/components/CloseBugWithCommentButton/index.tsx
index a0fefa4a..efad39b3 100644
--- a/webui/src/components/CloseBugWithCommentButton/index.tsx
+++ b/webui/src/components/CloseBugWithCommentButton/index.tsx
@@ -1,22 +1,12 @@
-import React from 'react';
-
-import Button from '@material-ui/core/Button';
-import CircularProgress from '@material-ui/core/CircularProgress';
-import { makeStyles, Theme } from '@material-ui/core/styles';
-import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
+import ErrorOutlineIcon from '@mui/icons-material/ErrorOutline';
+import Button from '@mui/material/Button';
+import CircularProgress from '@mui/material/CircularProgress';
import { BugFragment } from 'src/pages/bug/Bug.generated';
import { TimelineDocument } from 'src/pages/bug/TimelineQuery.generated';
import { useAddCommentAndCloseBugMutation } from './CloseBugWithComment.generated';
-const useStyles = makeStyles((theme: Theme) => ({
- closeIssueIcon: {
- color: theme.palette.secondary.dark,
- paddingTop: '0.1rem',
- },
-}));
-
interface Props {
bug: BugFragment;
comment: string;
@@ -24,11 +14,8 @@ interface Props {
}
function CloseBugWithCommentButton({ bug, comment, postClick }: Props) {
- const [
- addCommentAndCloseBug,
- { loading, error },
- ] = useAddCommentAndCloseBugMutation();
- const classes = useStyles();
+ const [addCommentAndCloseBug, { loading, error }] =
+ useAddCommentAndCloseBugMutation();
function addCommentAndCloseBugAction() {
addCommentAndCloseBug({
@@ -64,7 +51,7 @@ function CloseBugWithCommentButton({ bug, comment, postClick }: Props) {
<Button
variant="contained"
onClick={() => addCommentAndCloseBugAction()}
- startIcon={<ErrorOutlineIcon className={classes.closeIssueIcon} />}
+ startIcon={<ErrorOutlineIcon />}
>
Close bug with comment
</Button>