Updates and more
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import type {Player, SchematicType, Server} from "../types/data.js";
|
||||
import {PlayerSchema, ServerSchema} from "../types/data.js";
|
||||
import type {Player, SchematicType} from "../types/data.js";
|
||||
import {PlayerSchema} from "../types/data.js";
|
||||
import {cached, cachedFamily} from "./cached.js";
|
||||
import type {Team} from "../types/team.js";
|
||||
import {TeamSchema} from "../types/team.js";
|
||||
import {derived, get, readable, writable} from "svelte/store";
|
||||
import {derived, get, writable} from "svelte/store";
|
||||
import {dataRepo, fetchWithToken, pageRepo, tokenStore} from "../repo/repo.js";
|
||||
import {z} from "zod";
|
||||
|
||||
@@ -47,7 +47,7 @@ export const branches = cached<string[]>([], async () => {
|
||||
return z.array(z.string()).parse(res);
|
||||
})
|
||||
|
||||
export const server = readable(new Promise((resolve) => {}), (set) => set(get(dataRepo).getServer()));
|
||||
export const server = derived(dataRepo, $dataRepo => $dataRepo.getServer());
|
||||
|
||||
export const isWide = writable(window.innerWidth >= 640);
|
||||
window.addEventListener("resize", () => isWide.set(window.innerWidth >= 640));
|
||||
|
||||
Reference in New Issue
Block a user