Skeleton: Define dependencies when fetching data

This commit is contained in:
2025-02-17 21:15:00 +01:00
parent 25a55ec94e
commit 04b69611a1
8 changed files with 31 additions and 8 deletions

View File

@ -10,7 +10,9 @@ export const ssr = false;
// since it's populated inside hooks.server.ts per request.
// It will populate the "user" attribute of each page's "data" object,
// so each page has access to the current user (or knows if no one is signed in).
export const load: LayoutLoad = async () => {
export const load: LayoutLoad = async ({ fetch, depends }) => {
depends("data:graphics");
return {
// User information (synchronous)
user: pbUser,