Fix:use LayoutServerLoad, update dependency

This commit is contained in:
schooltechx 2023-06-16 13:03:27 +07:00
parent c4ca7ad81c
commit 68e5b3d11a
3 changed files with 824 additions and 822 deletions

View file

@ -1,10 +1,8 @@
import { env } from '$env/dynamic/private'
import type { PageServerLoad } from './$types'
export const load: PageServerLoad = async ({fetch}) => {
import type { LayoutServerLoad } from './$types'
export const load: LayoutServerLoad = async ({fetch}) => {
const url = env.API_CMS_URL+"/home"
console.log(url)
const res = await fetch(url)
console.log("after fetch")
if(!res.ok)
{
console.log("load offline data instead")