MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / Link

Function Link

apps/site/components/Link.tsx:9–20  ·  view source on GitHub ↗
({ href, ...props })

Source from the content-addressed store, hash-verified

7 | ComponentProps<typeof LocalizedLink>;
8
9const Link: FC<LinkProps> = ({ href, ...props }) => {
10 if (!href || /^https?:/.test(href as string)) {
11 return <a href={href as string} {...props} />;
12 }
13
14 return (
15 <LocalizedLink
16 href={href}
17 {...(props as Omit<ComponentProps<typeof LocalizedLink>, 'href'>)}
18 />
19 );
20};
21
22export default Link;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected