mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 16:42:19 +00:00
* refactor: streamline codebase, unify duplicated modules, and consolidate tests * fix(test): batch discovered test files into Windows-safe command lines
18 lines
490 B
TypeScript
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();
|