upend/webui/src/util/info.ts

9 lines
276 B
TypeScript

import api from "../lib/api";
import { readable, type Readable } from "svelte/store";
import type { VaultInfo } from "upend/types";
export const vaultInfo: Readable<VaultInfo> = readable(undefined, (set) => {
api.fetchInfo().then(async (info) => {
set(info);
});
});