);
if (!npub) return inner;
return {inner};
}
/**
* Full attendee list for a host: tabbed Going / Interested, each row showing a
* face + name, plus a "trust signal" summarizing how many of the Going crowd
* are people the viewer follows or trusted mappers (skate events live or die on
* whether real locals show up).
*/
export function AttendeeList({
going,
tentative,
className,
}: {
going: string[];
tentative: string[];
className?: string;
}) {
const [tab, setTab] = useState<'going' | 'tentative'>('going');
const allPubkeys = useMemo(() => [...new Set([...going, ...tentative])], [going, tentative]);
const { data: trustScores } = useBatchTrustScores(allPubkeys);
const trustedGoing = useMemo(
() => going.filter((pk) => (trustScores?.get(pk) ?? 0) >= TRUSTED_THRESHOLD).length,
[going, trustScores],
);
if (going.length === 0 && tentative.length === 0) {
return (