upend/webui/src/util/info.ts

10 lines
282 B
TypeScript
Raw Normal View History

import { readable, type Readable } from "svelte/store";
2022-02-02 22:36:45 +01:00
import type { VaultInfo } from "upend/types";
import { fetchInfo } from "../lib/api";
2022-02-02 22:36:45 +01:00
export const vaultInfo: Readable<VaultInfo> = readable(undefined, (set) => {
fetchInfo().then(async (info) => {
set(info);
2022-02-02 22:36:45 +01:00
});
});