import React from 'react'; import { UserAvatar } from '../../components/UserAvatar'; import { AvatarStack } from '../../components/AvatarStack'; import { Presence } from '../../lib/docSync/transport'; const MAX_VISIBLE = 3; interface PresenceAvatarsProps { people: Presence[]; avatars: Map; // userId -> avatarUrl } // Who else has the note open: the shared AvatarStack plus the full list on hover / keyboard focus export const PresenceAvatars: React.FC = ({ people, avatars }) => { if (people.length === 0) return null; return (
p.name).join(', ')}`} > ({ id: p.userId, name: p.name, avatarUrl: avatars.get(p.userId) }))} max={MAX_VISIBLE} />
Gerade online
{people.map((p) => (
{p.name}
))}
); };