This commit is contained in:
Yanick Champoux 2024-02-04 14:42:12 -05:00
parent 6306cb32be
commit 2c219ae4cc
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1,2 @@
export const prerender = true;
export const ssr = false;

View File

@ -1,9 +1,9 @@
import { dev } from '$app/environment';
import { dev, browser } from '$app/environment';
export async function load({ fetch }) {
const url = dev ? '/dev/games.json' : '/games.json';
return {
games: fetch(url).then((doc) => doc.json()),
games: browser ? fetch(url).then((doc) => doc.json()) : [],
};
}