// @ts-nocheck import Link from 'next/link' import type { ReactNode } from 'react' import { cn } from 'ui' import { useSendEventMutation } from '@/data/telemetry/send-event-mutation' import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization' import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject' type SingleStatProps = { icon: ReactNode label: ReactNode value: ReactNode className?: string href?: string onClick?: () => void trackingProperties?: { stat_type: 'migrations' | 'backups' | 'branches' stat_value: number } } export const SingleStat = ({ icon, label, value, className, href, onClick, trackingProperties, }: SingleStatProps) => { const { mutate: sendEvent } = useSendEventMutation() const { data: project } = useSelectedProjectQuery() const { data: organization } = useSelectedOrganizationQuery() const trackActivityStat = () => { if (trackingProperties && project?.ref && organization?.slug) { sendEvent({ action: 'home_activity_stat_clicked', properties: trackingProperties, groups: { project: project.ref, organization: organization.slug, }, }) } } const content = (