Merge commit

This commit is contained in:
Tanyalak 2023-04-07 17:59:38 +07:00
commit f2a70888e3
24 changed files with 989 additions and 654 deletions

View file

@ -1,9 +1,17 @@
import content from "$lib/data/content/qualifying.html?raw"
import {getQualifyExams} from "$lib/data/info"
import type { PageServerLoad } from './$types'
import type {CalendarEvent} from '$lib/components/CalendarEvent'
export const load: PageServerLoad = async () => {
const exams = await getQualifyExams()
import type {Exam} from '$lib/components/Exam'
export const load: PageServerLoad = async ({fetch}) => {
let content = ""
let exams:Exam[] = []
let res = await fetch("/api/content?page=qualifying")
if(res.ok){
content = (await res.json()).content
}
res = await fetch("/api/qualifying")
if(res.ok){
exams = await res.json()
}
const events:CalendarEvent[]=[]
exams.forEach(({id,title,start,institute_id})=>{
let backgroundColor =""