From f45b48a347fe16a87fc50331527a12b0d7bc855d Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 24 Sep 2024 16:36:06 +0530 Subject: [PATCH] unfile --- .../photos/components/Gallery/PersonList.tsx | 42 ---------------- .../new/photos/components/Gallery/index.tsx | 49 +++++++++++++++++-- 2 files changed, 45 insertions(+), 46 deletions(-) delete mode 100644 web/packages/new/photos/components/Gallery/PersonList.tsx diff --git a/web/packages/new/photos/components/Gallery/PersonList.tsx b/web/packages/new/photos/components/Gallery/PersonList.tsx deleted file mode 100644 index c659ce292c..0000000000 --- a/web/packages/new/photos/components/Gallery/PersonList.tsx +++ /dev/null @@ -1,42 +0,0 @@ -import type { Person } from "@/new/photos/services/ml/cgroups"; -import OverflowMenu from "@ente/shared/components/OverflowMenu/menu"; -import { OverflowMenuOption } from "@ente/shared/components/OverflowMenu/option"; -import EditIcon from "@mui/icons-material/Edit"; -import MoreHoriz from "@mui/icons-material/MoreHoriz"; -import { t } from "i18next"; -import React from "react"; -import { SpaceBetweenFlex } from "../mui-custom"; -import { GalleryItemsHeaderAdapter, GalleryItemsSummary } from "./ListHeader"; - -interface PeopleListHeaderProps { - person: Person; -} - -export const PersonListHeader: React.FC = ({ - person, -}) => { - const hasOptions = process.env.NEXT_PUBLIC_ENTE_WIP_CL; - return ( - - - - {hasOptions && ( - } - > - } - onClick={() => console.log("test")} - > - {t("download_album")} - - - )} - - - ); -}; diff --git a/web/packages/new/photos/components/Gallery/index.tsx b/web/packages/new/photos/components/Gallery/index.tsx index 928f1c3da0..25dfbf49ee 100644 --- a/web/packages/new/photos/components/Gallery/index.tsx +++ b/web/packages/new/photos/components/Gallery/index.tsx @@ -1,14 +1,22 @@ /** - * @file code that really belongs to pages/gallery.tsx itself, but written here - * in a separate file so that we can write in this package that has TypeScript - * strict mode enabled. Once the original gallery.tsx is strict mode, this code - * can be inlined back there. + * @file code that really belongs to pages/gallery.tsx itself (or related + * files), but it written here in a separate file so that we can write in this + * package that has TypeScript strict mode enabled. + * + * Once the original gallery.tsx is strict mode, this code can be inlined back + * there. */ +import type { Person } from "@/new/photos/services/ml/cgroups"; import type { SearchOption } from "@/new/photos/services/search/types"; +import OverflowMenu from "@ente/shared/components/OverflowMenu/menu"; +import { OverflowMenuOption } from "@ente/shared/components/OverflowMenu/option"; +import EditIcon from "@mui/icons-material/Edit"; +import MoreHoriz from "@mui/icons-material/MoreHoriz"; import { Typography } from "@mui/material"; import { t } from "i18next"; import React from "react"; +import { SpaceBetweenFlex } from "../mui-custom"; import { GalleryItemsHeaderAdapter, GalleryItemsSummary } from "./ListHeader"; interface SearchResultsHeaderProps { @@ -28,3 +36,36 @@ export const SearchResultsHeader: React.FC = ({ /> ); + +interface PeopleListHeaderProps { + person: Person; +} + +export const PersonListHeader: React.FC = ({ + person, +}) => { + const hasOptions = process.env.NEXT_PUBLIC_ENTE_WIP_CL; + return ( + + + + {hasOptions && ( + } + > + } + onClick={() => console.log("test")} + > + {t("download_album")} + + + )} + + + ); +};