Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix 6081

Manav Rathi8dd6e7d8edce
diff --git a/web/packages/base/components/mui/SidebarDrawer.tsx b/web/packages/base/components/mui/SidebarDrawer.tsx
index d77950ebde..93862059e6 100644
--- a/web/packages/base/components/mui/SidebarDrawer.tsx
+++ b/web/packages/base/components/mui/SidebarDrawer.tsx
@@ -181,30 +181,6 @@ export const SidebarDrawerTitlebar: React.FC<SidebarDrawerTitlebarProps> = ({
</Stack>
);
-/**
- * A variant of {@link SidebarDrawerTitlebar} with a close button where the back
- * button is, and none of the other whistles.
- *
- * This is currently only used by the top level "File info" screen; the reason
- * for keeping this here so that it also gets modified when we modify the
- * spacing etc for {@link SidebarDrawerTitlebar} so that they both look visually
- * similar (apart from the obvious icon differences).
- */
-export const SidebarDrawerTitlebarClose: React.FC<
- Pick<SidebarDrawerTitlebarProps, "onClose" | "title">
-> = ({ title, onClose }) => (
- <Stack sx={{ gap: "4px" }}>
- <Stack direction="row" sx={{ justifyContent: "space-between" }}>
- <IconButton onClick={onClose} color="secondary">
- <CloseIcon />
- </IconButton>
- </Stack>
- <Box sx={{ px: "16px", py: "4px" }}>
- <Typography variant="h3">{title}</Typography>
- </Box>
- </Stack>
-);
-
/**
* A variant of {@link NestedSidebarDrawer} that additionally shows a title.
*
diff --git a/web/packages/gallery/components/FileInfo.tsx b/web/packages/gallery/components/FileInfo.tsx
index 1ac6f85612..3c843f6ffa 100644
--- a/web/packages/gallery/components/FileInfo.tsx
+++ b/web/packages/gallery/components/FileInfo.tsx
@@ -41,7 +41,6 @@ import { ActivityIndicator } from "ente-base/components/mui/ActivityIndicator";
import {
SidebarDrawer,
SidebarDrawerTitlebar,
- SidebarDrawerTitlebarClose,
} from "ente-base/components/mui/SidebarDrawer";
import { SingleInputForm } from "ente-base/components/SingleInputForm";
import { EllipsizedTypography } from "ente-base/components/Typography";
@@ -267,7 +266,11 @@ export const FileInfo: React.FC<FileInfoProps> = ({
return (
<FileInfoSidebar {...{ open, onClose }}>
- <SidebarDrawerTitlebarClose {...{ onClose }} title={t("info")} />
+ <SidebarDrawerTitlebar
+ onClose={onClose}
+ onRootClose={onClose}
+ title={t("info")}
+ />
<Stack sx={{ pt: 1, pb: 3, gap: "20px" }}>
<Caption
{...{