{#if $reactions.length > 0 || $zaps.length || $reports.length > 0}
{#if url && $reports.length > 0}
{$reports.length}
{/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 = $pubkey && pubkeys.includes($pubkey)} {@const info = displayList(pubkeys.map(pubkey => displayProfileByPubkey(pubkey)))} {@const tooltip = `${info} zapped`}
{amount}
{/each} {#each groupedReactions.entries() as [key, events]} {@const pubkeys = events.map(e => e.pubkey)} {@const isOwn = $pubkey && pubkeys.includes($pubkey)} {@const info = displayList(pubkeys.map(pubkey => displayProfileByPubkey(pubkey)))} {@const tooltip = `${info} reacted`} {@const onClick = () => onReactionClick(events)}
{#if events.length > 1}
{events.length}
{/if}
{/each} {@render children?.()}
{/if}