This commit is contained in:
2024-08-15 16:38:50 +02:00
parent 4afd833276
commit 22f24e92c3
19 changed files with 148 additions and 69 deletions

View File

@ -23,6 +23,8 @@
export let gamemode: string;
export let topFive: boolean = false;
let request = getRequest();
function getRequest() {
@ -33,6 +35,7 @@
{#await request}
<p>Loading...</p>
{:then data}
{@const topFiveData = data.slice(0, 5)}
<div>
<table>
<thead>
@ -43,7 +46,7 @@
</tr>
</thead>
<tbody>
{#each data as player, i (player.name)}
{#each (topFive ? topFiveData : data) as player, i (player.name)}
<tr>
<td>{`${i + 1}.`}</td>
<td>{player.name}</td>