Fix reported errors to make build pass

This commit is contained in:
2024-10-31 12:54:24 +01:00
parent 7e7716e4e8
commit 329381ad10

View File

@@ -40,18 +40,22 @@ console.log(request);
fetch(window.location.href, {
method: "POST",
body: note.innerText,
body: note.textContent,
}).then((res) => {
if (res.status != 200) {
console.error(res);
const err = res.statusText;
const kaput = document.querySelector("#kaput");
kaput.classList.remove("display-none");
kaput.innerText = err;
if (!kaput) {
console.error("No kaput found");
return;
}
kaput?.classList.remove("display-none");
kaput.textContent = err;
} else {
const kaput = document.querySelector("#kaput");
kaput.classList.add("display-none");
note.innerText = "";
kaput?.classList.add("display-none");
note.textContent = "";
window.location.reload();
}
});
@@ -60,8 +64,7 @@ console.log(request);
</script>
<Layout title="Players">
<div id="kaput" class="display-none text-center text-2xl text-red-600 py-2">
</div>
<div id="kaput" class="display-none text-center text-2xl text-red-600 py-2"></div>
<form class="p-5 min-h-[25rem] h-[25rem]">
<div class="h-full w-full mb-4 border rounded-lg shadow-lg overflow-hidden flex flex-col">
<div
@@ -96,7 +99,7 @@ console.log(request);
</thead>
<tbody>
{data.data.map((player) => (
<tr key={player.name} class="hover:bg-gray-50">
<tr class="hover:bg-gray-50">
<td class="p-4 border border-gray-300">
<a href={`/player/${player.name}`} class="text-blue-600 hover:underline">
{player.name}