Skip to main content
Glama

Storyden

by Southclaws
Mozilla Public License 2.0
229
ReportPostMenuItem.tsx1.22 kB
import { useDisclosure } from "src/utils/useDisclosure"; import { ProfileReference } from "@/api/openapi-schema"; import * as Menu from "@/components/ui/menu"; import { ReportIcon } from "../ui/icons/Report"; import { ReportPostModal } from "./ReportPostModal"; type Props = { targetKind: "thread" | "reply" | "post"; targetId: string; author: ProfileReference; menuLabel: string; headline?: string; body?: string; }; export function ReportPostMenuItem({ targetKind, targetId, author, headline, body, menuLabel, }: Props) { const disclosure = useDisclosure(); return ( <> <Menu.Item value={`report-${targetKind}`} onClick={disclosure.onOpen}> <ReportIcon /> &nbsp; {menuLabel} </Menu.Item> <ReportPostModal targetKind={targetKind} targetId={targetId} author={author} headline={headline} body={body} {...disclosure} /> </> ); } export function truncateBody(value: string | undefined, maxLength = 280) { if (!value) return undefined; const trimmed = value.trim(); if (trimmed.length <= maxLength) { return trimmed; } return `${trimmed.slice(0, maxLength).trim()}…`; }

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