From 7634ba0deab1865b31b4e006bfab04641f059cd0 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 26 Sep 2024 14:17:35 +0530 Subject: [PATCH] Split options --- .../new/photos/components/Gallery/index.tsx | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/web/packages/new/photos/components/Gallery/index.tsx b/web/packages/new/photos/components/Gallery/index.tsx index 765f13acb8..cd46c4c243 100644 --- a/web/packages/new/photos/components/Gallery/index.tsx +++ b/web/packages/new/photos/components/Gallery/index.tsx @@ -58,6 +58,11 @@ export const PersonListHeader: React.FC = ({ }) => { // TODO-Cluster const hasOptions = process.env.NEXT_PUBLIC_ENTE_WIP_CL; + + const addPerson = () => { + console.log("add person"); + }; + return ( @@ -73,21 +78,27 @@ export const PersonListHeader: React.FC = ({ ariaControls={"person-options"} triggerButtonIcon={} > - } - centerAlign - onClick={() => console.log("test")} - > - {pt("Add a name")} - - - } - centerAlign - onClick={() => console.log("test")} - > - {pt("rename")} - + {person.type == "cgroup" ? ( + <> + } + centerAlign + onClick={() => console.log("test")} + > + {t("rename")} + + + ) : ( + <> + } + centerAlign + onClick={addPerson} + > + {pt("Add a name")} + + + )} )}