Racepicks: Refactor current racepick acquisition + use new fetchers

This commit is contained in:
2025-02-26 21:04:08 +01:00
parent 2952cac6ef
commit 1ca384700a
2 changed files with 9 additions and 15 deletions

View File

@ -2,10 +2,11 @@ import {
fetch_currentpickedusers,
fetch_currentrace,
fetch_drivers,
fetch_racepicks,
fetch_visibleracepicks,
fetch_raceresults,
fetch_races,
fetch_substitutions,
fetch_currentracepick,
} from "$lib/fetch";
import type { PageLoad } from "../$types";
@ -13,7 +14,7 @@ export const load: PageLoad = async ({ fetch, depends }) => {
depends("data:racepicks", "data:users", "data:raceresults", "data:drivers", "data:races");
return {
racepicks: fetch_racepicks(fetch),
racepicks: fetch_visibleracepicks(fetch),
currentpickedusers: fetch_currentpickedusers(fetch),
raceresults: fetch_raceresults(fetch),
drivers: fetch_drivers(fetch),
@ -21,5 +22,6 @@ export const load: PageLoad = async ({ fetch, depends }) => {
substitutions: fetch_substitutions(fetch),
currentrace: await fetch_currentrace(fetch),
racepick: await fetch_currentracepick(fetch),
};
};