Fix:use LayoutServerLoad, update dependency
This commit is contained in:
parent
c4ca7ad81c
commit
68e5b3d11a
3 changed files with 824 additions and 822 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue