tnhnthnhuehunh
This commit is contained in:
parent
0d2ec251e4
commit
121fa68e9a
1 changed files with 5 additions and 2 deletions
|
@ -58,7 +58,7 @@
|
||||||
}`}>✕</button
|
}`}>✕</button
|
||||||
>
|
>
|
||||||
{#if state === "LIST"}
|
{#if state === "LIST"}
|
||||||
{#each entries as entry, i}
|
{#each entries.sort((a, b) => b.votes - a.votes) as entry, i}
|
||||||
<article
|
<article
|
||||||
on:click|stopPropagation={() => (selection = i)}
|
on:click|stopPropagation={() => (selection = i)}
|
||||||
class={`bg-gray-100 rounded-lg w-full shadow p-4 flex items-center justify-between gap-4 ${
|
class={`bg-gray-100 rounded-lg w-full shadow p-4 flex items-center justify-between gap-4 ${
|
||||||
|
@ -130,7 +130,10 @@
|
||||||
class="text-4xl font-bold"
|
class="text-4xl font-bold"
|
||||||
contenteditable="true"
|
contenteditable="true"
|
||||||
on:blur={async (event) => {
|
on:blur={async (event) => {
|
||||||
entries[selection].name = event.target.innerHTML.split("<br>");
|
entries[selection].name = event.target.innerHTML
|
||||||
|
.split("<br>")
|
||||||
|
.filter((i) => i !== "<br>")
|
||||||
|
.join("");
|
||||||
console.log(entries[selection]);
|
console.log(entries[selection]);
|
||||||
console.log(selection);
|
console.log(selection);
|
||||||
await fetch(
|
await fetch(
|
||||||
|
|
Reference in a new issue