From 42860fa15985401825d8d51e73ec497fe5876710 Mon Sep 17 00:00:00 2001
From: Melonai <einebeere@gmail.com>
Date: Wed, 24 Mar 2021 09:51:36 +0100
Subject: Update SvelteKit to public beta

---
 client/src/lib/components/Response.svelte | 33 +++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 client/src/lib/components/Response.svelte

(limited to 'client/src/lib/components/Response.svelte')

diff --git a/client/src/lib/components/Response.svelte b/client/src/lib/components/Response.svelte
new file mode 100644
index 0000000..0ed8cc9
--- /dev/null
+++ b/client/src/lib/components/Response.svelte
@@ -0,0 +1,33 @@
+<script lang="ts">
+    import type { ShortenRequest } from "$lib/actions/shorten";
+
+    export let info: ShortenRequest;
+</script>
+
+<style>
+    div {
+        display: flex;
+        justify-content: space-between;
+    }
+
+    .url {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
+    .output {
+        margin-left: 50px;
+    }
+</style>
+
+<div>
+    <span class="url">{info.url}</span>
+    {#await info.response}
+        <span class="output">Loading...</span>
+    {:then { hash }} 
+        <a class="output" href="https://sho.rest/{hash}">sho.rest/{hash}</a>
+    {:catch { error }}
+        <span class="output">{error}</span>
+    {/await}
+</div>
\ No newline at end of file
-- 
cgit 1.4.1

