Use layout server types

This commit is contained in:
2022-10-25 16:31:20 +02:00
parent fb84501ccc
commit 5c4337a9a6
3 changed files with 7 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
import { error } from '@sveltejs/kit'
import type { PageServerLoad } from './$types'
import type { LayoutServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { PUBLIC_PREVIEW_COUNT } from '$env/static/public'
export const load: PageServerLoad = async () => {
export const load: LayoutServerLoad = async () => {
try {
const res = await fetchAPI(`query {
locations: location (filter: { status: { _eq: "published" }}) {

View File

@@ -1,9 +1,9 @@
import { error } from '@sveltejs/kit'
import type { PageServerLoad } from './$types'
import type { LayoutServerLoad } from './$types'
import { fetchAPI } from '$utils/api'
import { fetchSwell } from '$utils/functions/shopServer'
export const load: PageServerLoad = async () => {
export const load: LayoutServerLoad = async () => {
try {
// Get content from API
const res = await fetchAPI(`query {