change to adressable events

This commit is contained in:
@s.roertgen 2025-04-30 12:05:31 +02:00
parent d3fb4275ba
commit 99c0f580f3
4 changed files with 46 additions and 17 deletions

View file

@ -1,5 +1,5 @@
<script>
let { event } = $props();
let { event, showReactions } = $props();
import { onMount } from 'svelte';
import { NDKEvent } from '@nostr-dev-kit/ndk';
@ -7,6 +7,9 @@
import { writable } from 'svelte/store';
import { login } from '$lib';
console.log("show reactions", showReactions)
let reactions = writable([]);
let reacted = writable(window.localStorage.getItem(event.id));
let reaction = writable({})
@ -53,7 +56,7 @@
<span>👍 {$reactions.length}</span>
<span class="thanks">Danke für deinen Vote!</span>
<!-- <button onclick={() => deleteVote()} class="btn">Vote zurückziehen</button> -->
{:else}
{:else if showReactions === "true"}
<button onclick={() => sendReaction()} class="like">👍</button>
<span>{$reactions.length}</span>
{/if}