Open History to see the last commit
1import {
2 type ComposerPathSearchState,
3 type ComposerPathSearchTarget,
4} from "@t3tools/client-runtime/state/threads";
5
6import { useComposerPathSearch as useComposerPathSearchQuery } from "../state/queries";
7
8export function useComposerPathSearch(target: ComposerPathSearchTarget): ComposerPathSearchState {
9 const state = useComposerPathSearchQuery(target);
10 const entries = state.entries.map((entry) => ({ path: entry.path, kind: entry.kind }));
11 return {
12 entries,
13 error: state.error,
14 isPending: state.isPending,
15 };
16}