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

View File

@@ -1,14 +1,13 @@
import { authenticate, requestServerInfo } from '$lib/utils/auth';
import { getFormatter } from '$lib/utils/i18n';
import { searchUsersAdmin } from '@immich/sdk';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import type { PageLoad } from './$types';
export const load = (async () => {
await authenticate({ admin: true });
await requestServerInfo();
const allUsers = await searchUsersAdmin({ withDeleted: false });
const $t = get(t);
const $t = await getFormatter();
return {
allUsers,