({
href,
children,
...props
}: React.AnchorHTMLAttributes<HTMLAnchorElement> & { href: string })
| 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)}> |
nothing calls this directly
no test coverage detected