"use client";
export interface LeaderboardEntry {
handle: string;
avatar?: string;
did?: string;
score: number;
createdCount: number;
closedCount: number;
commentCount: number;
}
interface Props {
entries: LeaderboardEntry[];
collapsed: boolean;
compact?: boolean;
onToggleCollapse: () => void;
onExpandPanel: () => void;
onProfileClick: (handle: string) => void;
}
/**
* Compact leaderboard overlay widget that sits below the ActivityOverlay.
* Shows top contributors with avatars and key stats.
*/
export function LeaderboardOverlay({
entries,
collapsed,
compact,
onToggleCollapse,
onExpandPanel,
onProfileClick,
}: Props) {
if (collapsed) {
return (
);
}
return (
{/* Header */}
{/* Entries list — show top 3, scroll for more */}
{entries.slice(0, 3).map((entry, i) => (
))}
{/* Footer with "See all" */}
{entries.length > 0 && (
{entries.length} contributors
)}
);
}