Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Trim

Manav Rathi1dcf46309db6
diff --git a/web/apps/photos/src/components/PhotoViewer/index.tsx b/web/apps/photos/src/components/PhotoViewer/index.tsx
index 2ba43ada18..92ff57f85b 100644
--- a/web/apps/photos/src/components/PhotoViewer/index.tsx
+++ b/web/apps/photos/src/components/PhotoViewer/index.tsx
@@ -1048,19 +1048,19 @@ import {
FilledIconButton,
type ButtonishProps,
} from "@/new/photos/components/mui";
-import { Snackbar, Stack, type ButtonProps } from "@mui/material";
+import { Snackbar, type ButtonProps } from "@mui/material";
const ConversionFailedNotification: React.FC<
ConversionFailedNotificationProps
> = ({ open, onClose, onClick }) => {
- const handleClose: ButtonProps["onClick"] = (event) => {
+ const handleClick = () => {
+ onClick();
onClose();
- event.stopPropagation();
};
- const handleClick = () => {
- onClick();
+ const handleClose: ButtonProps["onClick"] = (event) => {
onClose();
+ event.stopPropagation();
};
return (
@@ -1073,41 +1073,24 @@ const ConversionFailedNotification: React.FC<
color={"secondary"}
onClick={handleClick}
sx={{
- textAlign: "left",
- flex: "1",
- padding: (theme) => theme.spacing(1.5, 2),
borderRadius: "8px",
+ flex: 1,
+ display: "flex",
+ alignItems: "center",
+ gap: "16px",
}}
>
- <Stack
- flex={"1"}
- spacing={2}
- direction="row"
- alignItems={"center"}
- width={"100%"}
- >
- <Box sx={{ svg: { fontSize: "36px" } }}>
- <InfoIcon />
- </Box>
+ <Box sx={{ svg: { fontSize: "36px" } }}>
+ <InfoIcon />
+ </Box>
- <Stack
- direction={"column"}
- spacing={0.5}
- flex={1}
- textAlign="left"
- // This is necessary to trigger the ellipsizing of the
- // text in children.
- overflow="hidden"
- >
- <Typography variant="small">
- {t("CONVERSION_FAILED_NOTIFICATION_MESSAGE")}
- </Typography>
- </Stack>
-
- <FilledIconButton onClick={handleClose}>
- <CloseIcon />
- </FilledIconButton>
- </Stack>
+ <Typography variant="small" sx={{ flex: 1, textAlign: "left" }}>
+ {t("CONVERSION_FAILED_NOTIFICATION_MESSAGE")}
+ </Typography>
+
+ <FilledIconButton onClick={handleClose}>
+ <CloseIcon />
+ </FilledIconButton>
</Button>
</Snackbar>
);