From 32799f64bdabbc9514cb579c5454b1fc5044dacc Mon Sep 17 00:00:00 2001 From: mat Date: Wed, 23 Mar 2022 19:07:28 -0500 Subject: don't show next/last api update when there's no election --- src/routes/election.svelte | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/routes/election.svelte b/src/routes/election.svelte index 388844d..0928991 100644 --- a/src/routes/election.svelte +++ b/src/routes/election.svelte @@ -67,22 +67,24 @@
-
-

- Last API update: - {millisecondsToTime(currentTime - data.lastUpdated, { - smallestUnit: 1, - parts: 1, - })} ago -

-

- Next API update: - {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated), { - smallestUnit: 1, - parts: 1, - })} -

-
+ {#if data.current} +
+

+ Last API update: + {millisecondsToTime(currentTime - data.lastUpdated, { + smallestUnit: 1, + parts: 1, + })} ago +

+

+ Next API update: + {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated), { + smallestUnit: 1, + parts: 1, + })} +

+
+ {/if}

SkyBlock Mayor Election Status

Next election: -- cgit