{#if $reactions.length > 0 || $zaps.length || $reports.length > 0 || children}
{#if url && $reports.length > 0 && $userIsAdmin} {/if} {#each groupedZaps.entries() as [key, zaps]} {@const amount = fromMsats(sum(zaps.map(zap => zap.invoiceAmount)))} {@const pubkeys = uniq(zaps.map(zap => zap.request.pubkey))} {@const isOwn = pubkeys.includes($user.pubkey)} {@const info = displayList( pubkeys.map(pubkey => $profiles.display(pubkey, removeUndefined([url])).get()), )} {@const tooltip = `${info} zapped`} {@const onZapClickHandler = () => onZapClick(pubkeys, tooltip)} {/each} {#each groupedReactions.entries() as [key, events]} {@const pubkeys = events.map(e => e.pubkey)} {@const isOwn = pubkeys.includes($user.pubkey)} {@const info = displayList( pubkeys.map(pubkey => $profiles.display(pubkey, removeUndefined([url])).get()), )} {@const tooltip = `${info} reacted`} {@const onClick = () => onReactionClick(events, pubkeys, info)} {/each} {@render children?.()}
{/if}