<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>
