Skeleton: Fetch static data (teams/drivers/races/substitutions) in global layout asynchronously
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 29s

This commit is contained in:
2025-02-03 22:34:07 +01:00
parent 3bb2e318b1
commit 346fdb3b75
12 changed files with 259 additions and 363 deletions

View File

@ -2,7 +2,7 @@
import { Button, Table, type TableColumn } from "$lib/components";
import { getModalStore, type ModalSettings, type ModalStore } from "@skeletonlabs/skeleton";
import type { PageData } from "./$types";
import { get_by_value } from "$lib/database";
import { get_by_value, get_race_pictogram_template } from "$lib/database";
import type { Race } from "$lib/schema";
let { data }: { data: PageData } = $props();
@ -62,8 +62,7 @@
meta: {
disable_inputs: !data.admin,
require_inputs: true,
pictogram_template:
get_by_value(data.graphics, "name", "race_pictogram_template")?.file_url ?? "Invalid",
pictogram_template: get_race_pictogram_template(await data.graphics),
},
};