<script>

    
  let data = null;

  const req = fetch(`http://localhost:6130/api/v1/list`)
    .then((res) => res.json())
    .then(resData => data = resData);

</script>

{#if data}
<ul>
    {#each data as paste (paste.id)}
    <li>
        <a href="/view/{paste.id}">
        ID: {paste.id} ({paste.size} bytes)
    </a>
    </li>
    {/each}
</ul>
{/if}