DISABLE SSR AND TRANSITION TO SPA

This commit is contained in:
2025-02-08 16:37:58 +01:00
parent 91fc3ae7a2
commit f868d779e7
26 changed files with 1141 additions and 1317 deletions

View File

@ -0,0 +1,18 @@
import { pb } from "$lib/pocketbase";
import type { RaceResult } from "$lib/schema";
import type { PageLoad } from "../../$types";
export const load: PageLoad = async ({ fetch }) => {
// TODO: Duplicated code from racepicks/+page.server.ts
const fetch_raceresults = async (): Promise<RaceResult[]> => {
const raceresults: RaceResult[] = await pb
.collection("raceresultsdesc")
.getFullList({ fetch: fetch });
return raceresults;
};
return {
results: await fetch_raceresults(),
};
};