wm-fontis-tibi-2023/frontend/src/lib/store.ts
2023-11-12 10:02:26 +00:00

23 lines
859 B
TypeScript

import { writable } from "svelte/store"
const initLoc = {
path: (typeof window !== "undefined" && window.location?.pathname) || "/",
search: (typeof window !== "undefined" && window.location?.search) || "",
hash: (typeof window !== "undefined" && window.location?.hash) || "",
push: false,
pop: false,
categoryPath: "",
}
export const location = writable(initLoc)
export let navigation = writable<Navigation>()
export let pages = writable<Pages>({})
export let team = writable<Pages>({})
export let jobOffers = writable<Pages>({})
export let modules = writable<{ [id: string]: Module }>({})
export let mediaLibrary = writable<{ [id: string]: MediaLibrary }>({})
export let serviceNavigation = writable<Navigation>()
export let rerender = writable(0)
export let scrollToRowNr = writable(-1)
export let openExtendableNr = writable(-1)