fix(web): i18n race condition in load function (#10693)

This commit is contained in:
Michel Heusschen
2024-06-29 18:29:56 +02:00
committed by GitHub
parent 24c1855899
commit 8f553ddb39
31 changed files with 74 additions and 89 deletions
+2 -3
View File
@@ -1,14 +1,13 @@
import { loadConfig } from '$lib/stores/server-config.store';
import { authenticate } from '$lib/utils/auth';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import { getFormatter } from '$lib/utils/i18n';
import type { PageLoad } from './$types';
export const load = (async () => {
await authenticate({ admin: true });
await loadConfig();
const $t = get(t);
const $t = await getFormatter();
return {
meta: {