diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/ShareQuickOption.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/ShareQuickOption.tsx deleted file mode 100644 index 4d9565c32a..0000000000 --- a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/ShareQuickOption.tsx +++ /dev/null @@ -1,45 +0,0 @@ -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 ".."; - -interface Iprops { - handleCollectionAction: ( - action: CollectionActions, - loader?: boolean, - ) => (...args: any[]) => Promise; - collectionSummaryType: CollectionSummaryType; -} - -export function ShareQuickOption({ - handleCollectionAction, - collectionSummaryType, -}: Iprops) { - return ( - - - - - - ); -} 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 65af430f46..9b0e1069db 100644 --- a/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/index.tsx +++ b/web/apps/photos/src/components/Collections/CollectionOptions/QuickOptions/index.tsx @@ -1,10 +1,12 @@ import { FlexWrapper } from "@ente/shared/components/Container"; import EnteSpinner from "@ente/shared/components/EnteSpinner"; +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"; -import { ShareQuickOption } from "./ShareQuickOption"; interface QuickOptionsProps { handleCollectionAction: ( @@ -49,6 +51,7 @@ export const QuickOptions: React.FC = ({ const showEmptyTrashQuickOption = (type: CollectionSummaryType) => { return type === CollectionSummaryType.trash; }; + const showDownloadQuickOption = (type: CollectionSummaryType) => { return ( type === CollectionSummaryType.folder || @@ -64,6 +67,7 @@ const showDownloadQuickOption = (type: CollectionSummaryType) => { type === CollectionSummaryType.pinned ); }; + const showShareQuickOption = (type: CollectionSummaryType) => { return ( type === CollectionSummaryType.folder || @@ -76,3 +80,41 @@ const showShareQuickOption = (type: CollectionSummaryType) => { type === CollectionSummaryType.pinned ); }; + +interface ShareQuickOptionProps { + handleCollectionAction: ( + action: CollectionActions, + loader?: boolean, + ) => (...args: any[]) => Promise; + collectionSummaryType: CollectionSummaryType; +} + +const ShareQuickOption: React.FC = ({ + handleCollectionAction, + collectionSummaryType, +}) => ( + + + + + +);