1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

feat(web): require page load to export title (#1956)

This commit is contained in:
Michel Heusschen 2023-03-06 15:25:25 +01:00 committed by GitHub
parent 950989a85e
commit 8857d0b8df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 3 deletions

8
web/src/app.d.ts vendored
View file

@ -8,7 +8,13 @@ declare namespace App {
api: import('@api').ImmichApi;
}
// interface Platform {}
interface PageData {
meta: {
title: string;
description?: string;
imageUrl?: string;
};
}
interface Error {
message: string;

View file

@ -9,5 +9,11 @@ export const load = (async ({ locals, parent }) => {
const { data: items } = await locals.api.searchApi.getExploreData();
return { user, items };
return {
user,
items,
meta: {
title: 'Explore'
}
};
}) satisfies PageServerLoad;

View file

@ -23,5 +23,13 @@ export const load = (async ({ locals, parent, url }) => {
undefined,
{ params: url.searchParams }
);
return { user, term, results };
return {
user,
term,
results,
meta: {
title: 'Search'
}
};
}) satisfies PageServerLoad;