diff options
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/election.svelte | 6 | ||||
| -rw-r--r-- | src/routes/index.svelte | 5 | ||||
| -rw-r--r-- | src/routes/player/[player]/index.svelte | 2 | ||||
| -rw-r--r-- | src/routes/profile/index.svelte | 2 |
4 files changed, 7 insertions, 8 deletions
diff --git a/src/routes/election.svelte b/src/routes/election.svelte index 8504622..2a818ec 100644 --- a/src/routes/election.svelte +++ b/src/routes/election.svelte @@ -52,7 +52,7 @@ // don't invalidate the first time the function is called if (!first) await invalidate('') - const lastUpdatedAgo = Date.now() - data.lastUpdated * 1000 + const lastUpdatedAgo = Date.now() - data.lastUpdated autoInvalidateTimeout = setTimeout(() => autoInvalidate(false), lastUpdatedAgo + 10 * 60 * 1000) } @@ -76,14 +76,14 @@ <div class="next-mayor-update"> <p> <b>Last API update:</b> - {millisecondsToTime(currentTime - data.lastUpdated * 1000, { + {millisecondsToTime(currentTime - data.lastUpdated, { smallestUnit: 1, parts: 1, })} ago </p> <p> <b>Next API update:</b> - {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated * 1000), { + {millisecondsToTime(10 * 60 * 1000 - (currentTime - data.lastUpdated), { smallestUnit: 1, parts: 1, })} diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 630882e..4756fed 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -74,9 +74,8 @@ <h2>Info</h2> <p>Website made by <a href="https://matdoes.dev">mat</a>.</p> <p> - Official hangout/support Discord: <a href="//discord.gg/KtscNUnh4f"> - discord.gg/KtscNUnh4f - </a>. + Official hangout/support Discord: + <a href="//discord.gg/KtscNUnh4f">discord.gg/KtscNUnh4f</a>. </p> <p> Resource packs: <a href="//packshq.com">PacksHQ</a> (default), diff --git a/src/routes/player/[player]/index.svelte b/src/routes/player/[player]/index.svelte index 7148f20..b2f61c9 100644 --- a/src/routes/player/[player]/index.svelte +++ b/src/routes/player/[player]/index.svelte @@ -52,7 +52,7 @@ } } - isActiveProfileOnline = Date.now() / 1000 - 60 < activeProfileLastSave + isActiveProfileOnline = Date.now() - 60 < activeProfileLastSave } $: [data, updateActiveProfile()] diff --git a/src/routes/profile/index.svelte b/src/routes/profile/index.svelte index a69afc5..477d359 100644 --- a/src/routes/profile/index.svelte +++ b/src/routes/profile/index.svelte @@ -34,7 +34,7 @@ } const isDonator = - donators.find(d => d.uuid === sessionResponse.account?.minecraftUuid) !== undefined + donators.find(d => d?.uuid === sessionResponse.account?.minecraftUuid) !== undefined const isAdmin = admins.find(a => a === sessionResponse.account?.minecraftUuid) !== undefined return { |
