diff --git a/src/routes/statistics/+page.svelte b/src/routes/statistics/+page.svelte index 1f4e0af..a2fa8ee 100644 --- a/src/routes/statistics/+page.svelte +++ b/src/routes/statistics/+page.svelte @@ -1,3 +1,112 @@ + + Formula 11 - Statistics + +
+ +
+ +
+
+ {#await data.scraped_driverstandings then driverstandings} + + {/await} + + +
+ {#await data.scraped_teamstandings then teamstandings} +
+ {/await} + + diff --git a/src/routes/statistics/+page.ts b/src/routes/statistics/+page.ts new file mode 100644 index 0000000..d6e60e5 --- /dev/null +++ b/src/routes/statistics/+page.ts @@ -0,0 +1,23 @@ +import { + fetch_drivers, + fetch_scraped_driverstandings, + fetch_scraped_raceresults, + fetch_scraped_raceresultsacc, + fetch_scraped_startinggrids, + fetch_scraped_teamstandings, +} from "$lib/fetch"; +import type { PageLoad } from "../$types"; + +export const load: PageLoad = async ({ fetch, depends }) => { + depends("data:drivers", "data:official"); + + return { + drivers: fetch_drivers(fetch), + + scraped_driverstandings: fetch_scraped_driverstandings(fetch), + scraped_teamstandings: fetch_scraped_teamstandings(fetch), + scraped_startinggrids: fetch_scraped_startinggrids(fetch), + scraped_raceresults: fetch_scraped_raceresults(fetch), + scraped_raceresultsacc: fetch_scraped_raceresultsacc(fetch), + }; +};