import React from "react"; import { ProviderInfo, CalendarData } from "../types/heatmap"; interface ProviderSummaryProps { provider: ProviderInfo; calendarData: CalendarData; rank: number; } const ProviderSummary: React.FC = ({ provider, calendarData, rank }) => { const providerName = provider.fullName || provider.authors[0]; const calendarKey = provider.authors[0]; const totalCount = calendarData[calendarKey]?.reduce((sum, day) => sum + day.count, 0) || 0; const handleClick = () => { const element = document.getElementById(`provider-${calendarKey}`); if (element) { element.scrollIntoView({ behavior: 'smooth' }); } }; return (
{/* Logo Circle with Release Count Badge */}
{provider.avatarUrl ? ( {`${providerName} ) : (
{providerName.charAt(0).toUpperCase()}
)} {/* Release Count Badge */}
{totalCount > 999 ? `${Math.floor(totalCount / 1000)}k` : totalCount}
); }; export default ProviderSummary;