Files
yaak-mountain-loop/apps/yaak-proxy/lib/store.ts
T
2026-10-26 06:38:34 -07:00

13 lines
424 B
TypeScript

import { createModelStore } from "@yaakapp-internal/model-store";
import type { Flow } from "@yaakapp-internal/proxy-lib";
type ProxyModels = {
flow: Flow;
};
export const { dataAtom, applyChange, replaceAll, listAtom, orderedListAtom } =
createModelStore<ProxyModels>(["flow"]);
/** Oldest first, so new traffic arrives at the end of the list */
export const flowsAtom = orderedListAtom("flow", "startedAt", "asc");