Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
227
useDraftListScreen.ts834 B
import { useNodeList } from "src/api/openapi-client/nodes"; import { Account, NodeListOKResponse, ThreadListOKResponse, Visibility, } from "src/api/openapi-schema"; export type Props = { session: Account; threads: ThreadListOKResponse; nodes: NodeListOKResponse; }; export function useDraftListScreen({ session, threads, nodes }: Props) { const { data: nodesData, error: errorNodes } = useNodeList( { author: session.handle, visibility: [Visibility.draft], }, { swr: { fallbackData: nodes } }, ); if (!nodesData) { return { ready: false as const, error: errorNodes, }; } const empty = nodes.nodes.length === 0; return { ready: true as const, empty, data: { nodes: nodesData.nodes, threads: threads.threads, }, session, }; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Southclaws/storyden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server