aboutsummaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-03-19 22:52:20 -0500
committermat <github@matdoes.dev>2022-03-19 22:52:20 -0500
commitce2230a67a72b9850b37576cb441a56ff3b71ee8 (patch)
treef61d7577089e129fee0185fafabc540ac6340c6a /src/routes
parent5937ac8c91a15e6bc8daf8d259eb9cd842b86d86 (diff)
downloadskyblock-stats-ce2230a67a72b9850b37576cb441a56ff3b71ee8.tar.gz
skyblock-stats-ce2230a67a72b9850b37576cb441a56ff3b71ee8.tar.bz2
skyblock-stats-ce2230a67a72b9850b37576cb441a56ff3b71ee8.zip
Add favicon + misc fixes
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/election.svelte6
-rw-r--r--src/routes/index.svelte5
-rw-r--r--src/routes/player/[player]/index.svelte2
-rw-r--r--src/routes/profile/index.svelte2
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 {