chore(web): translations in page load functions (#10260)

This commit is contained in:
Michel Heusschen
2024-06-13 16:23:52 +02:00
committed by GitHub
parent 827ec1b63a
commit 212ba35aef
20 changed files with 90 additions and 22 deletions
@@ -1,6 +1,8 @@
import { authenticate } from '$lib/utils/auth';
import { getAssetInfoFromParam } from '$lib/utils/navigation';
import { getUser } from '@immich/sdk';
import { t } from 'svelte-i18n';
import { get } from 'svelte/store';
import type { PageLoad } from './$types';
export const load = (async ({ params }) => {
@@ -8,11 +10,13 @@ export const load = (async ({ params }) => {
const partner = await getUser({ id: params.userId });
const asset = await getAssetInfoFromParam(params);
const $t = get(t);
return {
asset,
partner,
meta: {
title: 'Partner',
title: $t('partner'),
},
};
}) satisfies PageLoad;