From b24748777294b3646e67c4b7e599e032ee1dfcf9 Mon Sep 17 00:00:00 2001
From: Mitchell Riedstra <mitch@riedstra.dev>
Date: Sun, 1 Jan 2023 20:09:47 -0500
Subject: Start of Svelte UI

---
 ui/src/routes/list/+page.svelte | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 ui/src/routes/list/+page.svelte

(limited to 'ui/src/routes/list/+page.svelte')

diff --git a/ui/src/routes/list/+page.svelte b/ui/src/routes/list/+page.svelte
new file mode 100644
index 0000000..c487068
--- /dev/null
+++ b/ui/src/routes/list/+page.svelte
@@ -0,0 +1,22 @@
+<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}
\ No newline at end of file
-- 
cgit v1.2.3

