upend/webui/src/util/info.ts

10 lines
277 B
TypeScript
Raw Normal View History

2022-02-02 22:36:45 +01:00
import { readable, Readable } from "svelte/store";
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
});
});