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,13 +1,12 @@
import { authenticate } from '$lib/utils/auth';
import { getFormatter } from '$lib/utils/i18n';
import { getAssetInfoFromParam } from '$lib/utils/navigation';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import type { PageLoad } from './$types';
export const load = (async ({ params }) => {
await authenticate();
const asset = await getAssetInfoFromParam(params);
const $t = get(t);
const $t = await getFormatter();
return {
asset,
@@ -1,15 +1,14 @@
import { authenticate } from '$lib/utils/auth';
import { getFormatter } from '$lib/utils/i18n';
import { getAssetInfoFromParam } from '$lib/utils/navigation';
import { getAssetDuplicates } from '@immich/sdk';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import type { PageLoad } from './$types';
export const load = (async ({ params }) => {
await authenticate();
const asset = await getAssetInfoFromParam(params);
const duplicates = await getAssetDuplicates();
const $t = get(t);
const $t = await getFormatter();
return {
asset,