aboutsummaryrefslogtreecommitdiff
path: root/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/+layout.svelte10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index dc7cbd15..ab9bd40a 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -19,6 +19,7 @@
import type { LocaleDictionary } from '$lib/Locale/layout';
import locale from '$stores/locale';
import Skeleton from '$lib/Skeleton.svelte';
+ import subsPlease from '$stores/subsPlease';
export let data;
@@ -68,6 +69,15 @@
getUserIdentity(data.user).then((h) => {
if ($userIdentity.id === -2) userIdentity.set(h);
});
+
+ if (!$subsPlease)
+ subsPlease.set(
+ await (
+ await fetch(
+ root(`/api/subsplease?tz=${Intl.DateTimeFormat().resolvedOptions().timeZone}`)
+ )
+ ).json()
+ );
});
</script>