@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 03:37 UTC

next
tsx 36 lines 993 Bytes
Raw
1 "use client";
2
3 import Link from "next/link";
4 import type { AnchorHTMLAttributes, MouseEventHandler, ReactNode } from "react";
5
6 /**
7 * Stand-in for the landing-page `TrackedLink` (which fires PostHog
8 * analytics events). In docs we just render a plain link and ignore
9 * the analytics props so the call sites in `hero-section.tsx` keep
10 * working without further changes.
11 */
12 interface TrackedLinkProps
13 extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"> {
14 baseUrl: string;
15 /** Ignored — analytics layer not present in docs. */
16 event?: unknown;
17 /** Ignored — analytics layer not present in docs. */
18 placement?: string;
19 children?: ReactNode;
20 onMouseEnter?: MouseEventHandler<HTMLAnchorElement>;
21 onMouseLeave?: MouseEventHandler<HTMLAnchorElement>;
22 }
23
24 export function TrackedLink({
25 baseUrl,
26 event: _event,
27 placement: _placement,
28 children,
29 ...rest
30 }: TrackedLinkProps) {
31 return (
32 <Link href={baseUrl} {...rest}>
33 {children}
34 </Link>
35 );
36 }