Skeleton: Delegate data fetching to specific routes and only load what's needed

This commit is contained in:
2025-02-17 21:12:11 +01:00
parent 2b90f977d5
commit 25a55ec94e
7 changed files with 60 additions and 21 deletions

View File

@ -0,0 +1,10 @@
import { fetch_drivers, fetch_raceresults, fetch_races } from "$lib/fetch";
import type { PageLoad } from "../../$types";
export const load: PageLoad = async ({ fetch }) => {
return {
drivers: fetch_drivers(fetch),
races: fetch_races(fetch),
raceresults: fetch_raceresults(fetch),
};
};