We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/get-convex/convex-backend'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
import { formatDistanceToNow } from "date-fns";
import { useRefresh } from "@common/lib/useRefresh";
import { cn } from "@ui/cn";
import { Tooltip } from "@ui/Tooltip";
export function TimestampDistance({
prefix = "",
date,
className = "",
}: {
prefix?: string;
date: Date;
className?: string;
}) {
return (
<Tooltip tip={date.toLocaleString(undefined, { timeZoneName: "short" })}>
<div className={cn("text-xs text-content-secondary", className)}>
{`${prefix} ${formatDistanceToNow(date, {
addSuffix: true,
}).replace("about ", "")}`}
</div>
</Tooltip>
);
}
export function LiveTimestampDistance({
prefix,
date,
className,
}: {
prefix?: string;
date: Date;
className?: string;
}) {
return (
<Tooltip
tip={date.toLocaleString(undefined, { timeZoneName: "short" })}
className="truncate"
>
<div className={cn("truncate text-xs text-content-secondary", className)}>
{prefix} <LiveTimestampDistanceInner date={date} />
</div>
</Tooltip>
);
}
export function LiveTimestampDistanceInner({ date }: { date: Date }) {
useRefresh();
return (
<>
{formatDistanceToNow(date, {
addSuffix: true,
}).replace("about ", "")}
</>
);
}