From 15b14bbd8e9abea4c17db29640aaca603b68d8f7 Mon Sep 17 00:00:00 2001 From: Akis Date: Tue, 11 Oct 2022 17:20:42 +0300 Subject: [PATCH] fix announcements --- src/lib/Announcements.svelte | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/lib/Announcements.svelte b/src/lib/Announcements.svelte index 40663a3..4e48d48 100644 --- a/src/lib/Announcements.svelte +++ b/src/lib/Announcements.svelte @@ -1,8 +1,6 @@ -{#await promise} - -{:then state} +{#await fetchState("announcements") then state} {#if state.enabled === "true"}
- {#await fetchAnnouncements()} - - {:then} + {#await fetchAnnouncements() then announcements}
@@ -38,7 +32,7 @@
-

{announcements.title}

+ {announcements.title}
{#if announcements.link} @@ -48,8 +42,6 @@ {/if}
- {:catch} - {/await}
@@ -106,6 +98,7 @@ width: fit-content; display: flex; flex-direction: column; + gap: 1rem; } .announcement a {