diff --git a/web/apps/photos/src/components/ExportModal.tsx b/web/apps/photos/src/components/ExportModal.tsx index 3f71f201b3..e5cbee3bf8 100644 --- a/web/apps/photos/src/components/ExportModal.tsx +++ b/web/apps/photos/src/components/ExportModal.tsx @@ -2,6 +2,7 @@ import { EnteSwitch } from "@/base/components/EnteSwitch"; import { ensureElectron } from "@/base/electron"; import log from "@/base/log"; import { EnteFile } from "@/media/file"; +import { DialogCloseIconButton } from "@/new/photos/components/mui/Dialog"; import { useAppContext } from "@/new/photos/types/context"; import ChangeDirectoryOption from "@ente/shared/components/ChangeDirectoryOption"; import { @@ -9,13 +10,13 @@ import { VerticallyCenteredFlex, } from "@ente/shared/components/Container"; import LinkButton from "@ente/shared/components/LinkButton"; -import DialogTitleWithCloseButton from "@ente/shared/components/TitleWithCloseButton"; import { CustomError } from "@ente/shared/error"; import { Box, Button, Dialog, DialogContent, + DialogTitle, Divider, Tooltip, Typography, @@ -41,7 +42,11 @@ interface ExportModalProps { collectionNameMap: Map; } -export default function ExportModal(props: ExportModalProps) { +export default function ExportModal({ + show, + onHide, + collectionNameMap, +}: ExportModalProps) { const { showMiniDialog } = useAppContext(); const [exportStage, setExportStage] = useState(ExportStage.INIT); const [exportFolder, setExportFolder] = useState(""); @@ -79,11 +84,11 @@ export default function ExportModal(props: ExportModalProps) { }, []); useEffect(() => { - if (!props.show) { + if (!show) { return; } void syncExportRecord(exportFolder); - }, [props.show]); + }, [show]); // ====================== // HELPER FUNCTIONS @@ -166,15 +171,14 @@ export default function ExportModal(props: ExportModalProps) { }; return ( - - - {t("export_data")} - + + + + {t("export_data")} + + + + ); diff --git a/web/packages/shared/components/TitleWithCloseButton.tsx b/web/packages/shared/components/TitleWithCloseButton.tsx deleted file mode 100644 index 4d7945faf4..0000000000 --- a/web/packages/shared/components/TitleWithCloseButton.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { SpaceBetweenFlex } from "@ente/shared/components/Container"; -import CloseIcon from "@mui/icons-material/Close"; -import { DialogTitle, IconButton, Typography } from "@mui/material"; -import React from "react"; - -interface DialogTitleWithCloseButtonProps { - onClose: () => void; -} - -const DialogTitleWithCloseButton: React.FC< - React.PropsWithChildren -> = ({ children, onClose }) => { - return ( - - - - {children} - - {onClose && ( - - - - )} - - - ); -}; -export default DialogTitleWithCloseButton;