Started work on Teslafest Section

This commit is contained in:
Firq 2024-04-28 14:45:59 +02:00
parent 0afe61add2
commit 2af757d5bd
Signed by: Firq
GPG key ID: 4DE1059A4666E89F
12 changed files with 83 additions and 9 deletions
src/utils

View file

@ -7,8 +7,8 @@ export function plsLoadImage(record: ImportRecord<GlobImage>, path: string) {
return loadedImage
}
export async function plsLoadTAEntry(key: string) {
const filecontent = (await getEntry('taInfoData', key))?.data
export async function plsLoadTAEntry(key: string, file: "taInfoData" | "teslafest" = 'taInfoData') {
const filecontent = (await getEntry(file, key))?.data
if (!filecontent) throw new Error(`Datafile was not found for key ${key}`)
return filecontent
}