Add more Prerendering

This commit is contained in:
2024-03-09 18:22:14 +01:00
parent 7599038c82
commit 0590cd349a
5 changed files with 20 additions and 7 deletions

View File

@@ -70,5 +70,8 @@ export const branches = cached<string[]>([], async () => {
export const server = derived(dataRepo, $dataRepo => $dataRepo.getServer());
export const isWide = writable(window.innerWidth >= 640);
window.addEventListener("resize", () => isWide.set(window.innerWidth >= 640));
export const isWide = writable(typeof window !== "undefined" && window.innerWidth >= 640);
if (typeof window !== "undefined") {
window.addEventListener("resize", () => isWide.set(window.innerWidth >= 640));
}