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:
parent
950989a85e
commit
8857d0b8df
3 changed files with 23 additions and 3 deletions
8
web/src/app.d.ts
vendored
8
web/src/app.d.ts
vendored
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue