Clean up reactions/replies/thread actions

This commit is contained in:
Jon Staab
2024-10-24 09:45:27 -07:00
parent 72de2e1513
commit d5cd751387
8 changed files with 113 additions and 85 deletions
+19
View File
@@ -0,0 +1,19 @@
<script lang="ts">
import {groupBy, uniqBy} from "@welshman/lib"
import {REACTION} from "@welshman/util"
import {deriveEvents} from "@welshman/store"
import {pubkey, repository} from "@welshman/app"
import Icon from "@lib/components/Icon.svelte"
import {REPLY} from "@app/state"
export let event
const replies = deriveEvents(repository, {filters: [{kinds: [REPLY], "#E": [event.id]}]})
</script>
{#if $replies.length > 0}
<div class="flex-inline btn btn-neutral btn-xs gap-1 rounded-full">
<Icon icon="reply" />
{$replies.length}
</div>
{/if}