fix close button

This commit is contained in:
Abhinav 2022-06-11 15:32:12 +05:30
parent 8b9d27e34b
commit fc0d7bb5d9
2 changed files with 8 additions and 5 deletions

View file

@ -9,6 +9,9 @@ export function UploadProgressFooter() {
UploadProgressContext
);
const handleClose = () => {
onClose(null, null);
};
return (
<DialogActions>
{uploadStage === UPLOAD_STAGES.FINISH &&
@ -18,10 +21,7 @@ export function UploadProgressFooter() {
{constants.RETRY_FAILED}
</Button>
) : (
<Button
variant="contained"
fullWidth
onClick={() => onClose.bind(null)}>
<Button variant="contained" fullWidth onClick={handleClose}>
{constants.CLOSE}
</Button>
))}

View file

@ -51,6 +51,9 @@ export function UploadProgressTitle() {
UploadProgressContext
);
const toggleExpanded = () => setExpanded((expanded) => !expanded);
const handleClose = () => {
onClose(null, null);
};
return (
<DialogTitle>
@ -64,7 +67,7 @@ export function UploadProgressTitle() {
<IconButtonWithBG onClick={toggleExpanded}>
{expanded ? <MinimizeIcon /> : <MaximizeIcon />}
</IconButtonWithBG>
<IconButtonWithBG onClick={onClose.bind(null)}>
<IconButtonWithBG onClick={handleClose}>
<Close />
</IconButtonWithBG>
</Stack>