Seasonpicks: Fetch teams/drivers/seasonpicks
This commit is contained in:
12
src/routes/seasonpicks/+page.ts
Normal file
12
src/routes/seasonpicks/+page.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { fetch_drivers, fetch_seasonpicks, fetch_teams } from "$lib/fetch";
|
||||
import type { PageLoad } from "../$types";
|
||||
|
||||
export const load: PageLoad = async ({ fetch, depends }) => {
|
||||
depends("data:teams", "data:drivers", "data:seasonpicks");
|
||||
|
||||
return {
|
||||
teams: fetch_teams(fetch),
|
||||
drivers: fetch_drivers(fetch),
|
||||
seasonpicks: fetch_seasonpicks(fetch),
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user