import type {Peer} from '../types' import {shortId} from '../util' type Props = { others: Peer[] target: string | null onSelectTarget: (target: string | null) => void } export function PeerList({others, target, onSelectTarget}: Props) { return (

Send messages to

{others.length === 0 && (

No other peers yet. Open this page in a second browser tab (or send the URL to a friend) and they'll show up here.

)}
) } function initials(name: string): string { const cleaned = name.replace(/[()]/g, '').trim() return cleaned.slice(0, 2).toUpperCase() || '??' }