"use client"; import type { AnchorHTMLAttributes, ReactNode } from "react"; import { trackClientEvent } from "@/lib/analytics-client"; type TrackedLinkProps = AnchorHTMLAttributes & { entityId: string; children: ReactNode; }; export default function TrackedLink({ entityId, onClick, children, ...props }: TrackedLinkProps) { return { trackClientEvent({ type: "PROJECT_LINK_CLICK", entityId }); onClick?.(event); }}>{children}; }