diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/routes/election.svelte | 34 |
1 files changed, 18 insertions, 16 deletions
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 @@ <Header /> <main> - <div class="next-mayor-update"> - <p> - <b>Last API update:</b> - {millisecondsToTime(currentTime - data.lastUpdated, { - smallestUnit: 1, - parts: 1, - })} ago - </p> - <p> - <b>Next API update:</b> - {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated), { - smallestUnit: 1, - parts: 1, - })} - </p> - </div> + {#if data.current} + <div class="next-mayor-update"> + <p> + <b>Last API update:</b> + {millisecondsToTime(currentTime - data.lastUpdated, { + smallestUnit: 1, + parts: 1, + })} ago + </p> + <p> + <b>Next API update:</b> + {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated), { + smallestUnit: 1, + parts: 1, + })} + </p> + </div> + {/if} <h1>SkyBlock Mayor Election Status</h1> <p> <b>Next election:</b> |