s3-share/web/opener/Text.svelte
2022-05-10 22:37:30 +02:00

19 lines
336 B
Svelte

<script lang="ts">
import { onMount } from "svelte";
export let contentType: string;
export let filename: string;
export let slug: string;
let content = "";
onMount(async () => {
const res = await fetch(`/s/${slug}`);
content = await res.text();
});
</script>
<div>
Text opener
<pre><code>{ content }</code></pre>
</div>