//import  content from "$lib/data/content/home.html?raw"
//import { getQualifyExams,getCompetitiveExams } from '$lib/data/info';
import type { PageServerLoad } from './$types';
import type {Exam} from '$lib/components/Exam' 
export const load: PageServerLoad = async ({fetch}) => {
	let qualify_exams: Exam[] = []
	let competitive_exams: Exam[] = []
	let content = ""
	let res = await fetch("/api/content?page=home")
	if(res.ok){
		content = (await res.json()).content
	}
	res = await fetch("/api/qualifying")
	if(res.ok){
		qualify_exams = await res.json()
	}
	res = await fetch("/api/competitive")
	if(res.ok){
		competitive_exams = await res.json()
	}
    return { content , qualify_exams,competitive_exams };
};
