mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
23 lines
423 B
Svelte
23 lines
423 B
Svelte
<script lang="ts">
|
|
import Loading from "@app/Loading.svelte";
|
|
|
|
type T = $$Generic;
|
|
|
|
export let fetch: Promise<T>;
|
|
</script>
|
|
|
|
{#await fetch}
|
|
<Loading center />
|
|
{:then result}
|
|
<slot {result} />
|
|
{:catch err}
|
|
<div class="commit">
|
|
<div class="error error-message txt-tiny">
|
|
<div>
|
|
API request to <span class="txt-monospace">{err.url}</span>
|
|
failed.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/await}
|