diff --git a/components/item/ItemPeopleSections.tsx b/components/item/ItemPeopleSections.tsx index 0b16271f..2361d254 100644 --- a/components/item/ItemPeopleSections.tsx +++ b/components/item/ItemPeopleSections.tsx @@ -37,7 +37,18 @@ export const ItemPeopleSections: React.FC = ({ item, ...props }) => { return { ...item, People: people } as BaseItemDto; }, [item, people]); - const topPeople = useMemo(() => people.slice(0, 3), [people]); + const topPeople = useMemo(() => { + const seen = new Set(); + const unique: BaseItemPerson[] = []; + for (const person of people) { + if (person.Id && !seen.has(person.Id)) { + seen.add(person.Id); + unique.push(person); + } + if (unique.length >= 3) break; + } + return unique; + }, [people]); const renderActorSection = useCallback( (person: BaseItemPerson, idx: number, total: number) => {