Skip to content

Commit

Permalink
add more chats
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliapixel committed Aug 20, 2024
1 parent 2d1f3f7 commit 394cf9a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/lib/AsyncMarkdownReq.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
<script lang="ts">
import { dev } from "$app/environment";
import { marked, Renderer } from "marked";
import { slide } from "svelte/transition";
export let url: string;
async function request(url: string): Promise<string> {
let res = await fetch(url);
if (!res.ok) {
let err = new Error(`request to ${url} failed: ${res.status}`);
if (dev) {
console.warn(err);
}
throw err;
}
let md = await res.text();
return md;
}
Expand All @@ -27,4 +35,6 @@
<div transition:slide={{ duration: 250 }}>
{@html marked.parse(resp)}
</div>
{:catch}
<!-- nothing if it errors -->
{/await}
9 changes: 4 additions & 5 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@
"global",
"breadworms",
"psp1g",
"julialuxel"
// "ovrht",
// "d_egree",
// "ajspyman",
// "ryanpotat",
"julialuxel",
"ovrht",
"omie",
"vaiastol"
];
</script>

Expand Down

0 comments on commit 394cf9a

Please # to comment.