Files
memes-svelte/memes/src/routes/+page.ts
2023-03-09 18:58:59 -04:00

19 lines
459 B
TypeScript

// since there's no dynamic data here, we can prerender
// it so that it gets served as a static asset in production
export const prerender = true;
import type { PageLoad } from './$types';
import { dev } from '$app/environment';
export const load = (async ({fetch}) => {
if (dev) {
return {
"max": 1000
}
}
const res = await fetch('https://shoebottom.ca/host/memes/max.json')
const json = await res.json()
return json
}) satisfies PageLoad;