Files
Netcatty/application/state/hostTreeInlineGroupDeleteStore.ts
T
陈大猫 ad3d0cfeda refactor: streamline codebase, unify duplicated modules, and consolidate test suite (#4307)
* refactor: streamline codebase, unify duplicated modules, and consolidate tests

* fix(test): batch discovered test files into Windows-safe command lines
2026-11-23 11:00:14 +08:00

18 lines
490 B
TypeScript

import { createExternalStore } from './createExternalStore';
const store = createExternalStore<string | null>(null, {
isEqual: () => false,
});
export const hostTreeInlineGroupDeleteStore = {
getTargetPath: store.getSnapshot,
open: (groupPath: string) => store.setSnapshot(groupPath),
close: () => {
if (!store.getSnapshot()) return;
store.setSnapshot(null);
},
subscribe: store.subscribe,
};
export const useHostTreeInlineGroupDeleteTarget = () => store.useStore();