no srr
This commit is contained in:
parent
6306cb32be
commit
2c219ae4cc
@ -1 +1,2 @@
|
||||
export const prerender = true;
|
||||
export const ssr = false;
|
||||
|
@ -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()) : [],
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user