MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / LinkWrapper

Function LinkWrapper

apps/baseai.dev/src/components/ui/cta-buttons.tsx:26–43  ·  view source on GitHub ↗
({
		href,
		children,
		...props
	}: React.AnchorHTMLAttributes<HTMLAnchorElement> & { href: string })

Source from the content-addressed store, hash-verified

24 href.startsWith('https://langbase.com/docs') || href.startsWith('/');
25
26 const LinkWrapper = ({
27 href,
28 children,
29 ...props
30 }: React.AnchorHTMLAttributes<HTMLAnchorElement> & { href: string }) => {
31 if (isInternalLink(href)) {
32 return (
33 <Link href={href} {...props}>
34 {children}
35 </Link>
36 );
37 }
38 return (
39 <a href={href} target="_blank" rel="noopener noreferrer" {...props}>
40 {children}
41 </a>
42 );
43 };
44
45 return (
46 <div className={cn('not-prose mb-16 mt-12 flex gap-3 flex-wrap', className)}>

Callers

nothing calls this directly

Calls 1

isInternalLinkFunction · 0.85

Tested by

no test coverage detected