borrar amigxs

This commit is contained in:
Cat /dev/Nulo 2023-04-30 20:28:24 -03:00
parent 316388582f
commit 8ead9e4a72

View file

@ -34,6 +34,9 @@
$: id = `${myUser.room};${myUser.password}`;
const copiar = () => navigator.clipboard.writeText(id);
const remove = (id: UserIdentifier) =>
($friends = $friends.filter((i) => i.room !== id.room));
</script>
<button on:click={copiar}>copiar tu id</button>
@ -51,10 +54,13 @@
<ul>
{#each $allData as friend}
<li>
{#if friend.name}
<li>{friend.name} <small>({friend.id.room})</small></li>
{friend.name} <small>({friend.id.room})</small>
{:else}
<li>{friend.id.room}</li>
{friend.id.room}
{/if}
<button on:click={() => remove(friend.id)}>❌</button>
</li>
{/each}
</ul>