Skip to content

armgit / ente

Public Imported from GitHub
0

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

Inline

Manav Rathia4fa8e0debee
diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/EmptyTrashQuickOption.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/EmptyTrashQuickOption.tsx
deleted file mode 100644
index 9126cced13..0000000000
--- a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/EmptyTrashQuickOption.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";
-import { IconButton, Tooltip } from "@mui/material";
-import { t } from "i18next";
-import { CollectionActions } from "..";
-
-interface Iprops {
- handleCollectionAction: (
- action: CollectionActions,
- loader?: boolean,
- ) => (...args: any[]) => Promise<void>;
-}
-
-export function EmptyTrashQuickOption({ handleCollectionAction }: Iprops) {
- return (
- <Tooltip title={t("EMPTY_TRASH")}>
- <IconButton
- onClick={handleCollectionAction(
- CollectionActions.CONFIRM_EMPTY_TRASH,
- false,
- )}
- >
- <DeleteOutlinedIcon />
- </IconButton>
- </Tooltip>
- );
-}
diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/index.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/index.tsx
index 9b0e1069db..ae927b77f3 100644
--- a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/index.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/index.tsx
@@ -1,12 +1,12 @@
import { FlexWrapper } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";
+import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";
import PeopleIcon from "@mui/icons-material/People";
import { IconButton, Tooltip } from "@mui/material";
import { t } from "i18next";
import { CollectionSummaryType } from "types/collection";
import { CollectionActions } from "..";
import { DownloadQuickOption } from "./DownloadQuickOption";
-import { EmptyTrashQuickOption } from "./EmptyTrashQuickOption";
interface QuickOptionsProps {
handleCollectionAction: (
@@ -52,6 +52,28 @@ const showEmptyTrashQuickOption = (type: CollectionSummaryType) => {
return type === CollectionSummaryType.trash;
};
+interface EmptyTrashQuickOptionProps {
+ handleCollectionAction: (
+ action: CollectionActions,
+ loader?: boolean,
+ ) => (...args: any[]) => Promise<void>;
+}
+
+export const EmptyTrashQuickOption: React.FC<EmptyTrashQuickOptionProps> = ({
+ handleCollectionAction,
+}) => (
+ <Tooltip title={t("EMPTY_TRASH")}>
+ <IconButton
+ onClick={handleCollectionAction(
+ CollectionActions.CONFIRM_EMPTY_TRASH,
+ false,
+ )}
+ >
+ <DeleteOutlinedIcon />
+ </IconButton>
+ </Tooltip>
+);
+
const showDownloadQuickOption = (type: CollectionSummaryType) => {
return (
type === CollectionSummaryType.folder ||