diff --git a/web/packages/new/photos/components/NameInputDialog.tsx b/web/packages/new/photos/components/NameInputDialog.tsx index c6d01fd362..ae7c499eaf 100644 --- a/web/packages/new/photos/components/NameInputDialog.tsx +++ b/web/packages/new/photos/components/NameInputDialog.tsx @@ -13,7 +13,7 @@ type NameInputDialogProps = DialogVisibilityProps & { /** Placeholder string to show in the text input when it is empty. */ placeholder: string; /** The existing value, if any, of the text input. */ - initialValue: string | undefined; + initialValue?: string | undefined; /** Title of the submit button */ submitButtonTitle: string; /** diff --git a/web/packages/new/photos/components/PeopleSelector.tsx b/web/packages/new/photos/components/PeopleSelector.tsx index 78be8b99a8..52fa8382fe 100644 --- a/web/packages/new/photos/components/PeopleSelector.tsx +++ b/web/packages/new/photos/components/PeopleSelector.tsx @@ -9,7 +9,7 @@ import { } from "@mui/material"; import { t } from "i18next"; import React, { useState } from "react"; -import type { CollectionSummary } from "../services/collection/ui"; +import type { Person } from "../services/ml/people"; import { SpaceBetweenFlex, type ButtonishProps } from "./mui"; import { DialogCloseIconButton, @@ -33,10 +33,9 @@ export const PeopleSelector: React.FC = ({ const [openNameInput, setOpenNameInput] = useState(false); - const people: CollectionSummary[] = []; + const people: Person[] = []; const handleAddPerson = () => { - console.log("handleAddPerson"); setOpenNameInput(true); }; @@ -100,7 +99,6 @@ export const PeopleSelector: React.FC = ({ onClose={() => setOpenNameInput(false)} title={pt("New person") /* TODO-Cluster */} placeholder={t("enter_name")} - initialValue={""} submitButtonTitle={t("add")} onSubmit={handleAddPersonWithName} /> @@ -115,7 +113,7 @@ const DialogContent_ = styled(DialogContent)` `; interface PersonButtonProps { - person: CollectionSummary; + person: Person; onPersonClick: (personID: string) => void; } @@ -125,8 +123,9 @@ const PersonButton: React.FC = ({ }) => ( onPersonClick(person.id.toString())} + coverFile={person.displayFaceFile} + coverFaceID={person.displayFaceID} + onClick={() => onPersonClick(person.id)} > {person.name}