Skip to main content
Glama
custom-link.tsx926 B
import { cn } from "@/lib/utils" import { ExternalLink } from "lucide-react" import Link from "next/link" interface CustomLinkProps extends React.LinkHTMLAttributes<HTMLAnchorElement> { href: string } const CustomLink = ({ href, children, className, ...rest }: CustomLinkProps) => { const isInternalLink = href.startsWith("/") const isAnchorLink = href.startsWith("#") if (isInternalLink || isAnchorLink) { return ( <Link href={href} className={className} {...rest}> {children} </Link> ) } return ( <Link href={href} target="_blank" rel="noopener noreferrer" className={cn( "inline-flex items-center gap-1 align-baseline underline underline-offset-4", className )} {...rest} > <span>{children}</span> <ExternalLink className="ml-0.5 inline-block h-4 w-4" /> </Link> ) } export default CustomLink

Latest Blog Posts

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/mcpauth/mcpauth'

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