Add Cortex Portal — web visualization for knowledge graph
Express API server wrapping existing store/graph core with REST endpoints for nodes, edges, graph, and search. React + Vite portal with React Flow for interactive graph visualization, Tailwind CSS styling, and full CRUD UI (sidebar, node panel, add/link modals, search bar, toast notifications).
This commit is contained in:
9
portal/src/hooks/useNodes.ts
Normal file
9
portal/src/hooks/useNodes.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { api } from '../api';
|
||||
|
||||
export function useNodes(params?: { kind?: string; status?: string }) {
|
||||
return useQuery({
|
||||
queryKey: ['nodes', params],
|
||||
queryFn: () => api.listNodes(params),
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user