Add more Prerendering
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user