Racepicks: Refactor current racepick acquisition + use new fetchers
This commit is contained in:
@ -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),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user