import React from 'react'; import { Button } from '~/components/ui/Button'; import type { GitHubStats } from '~/types/GitHub'; interface StatsDisplayProps { stats: GitHubStats; onRefresh?: () => void; isRefreshing?: boolean; } export function StatsDisplay({ stats, onRefresh, isRefreshing }: StatsDisplayProps) { // Calculate top languages for display const topLanguages = Object.entries(stats.languages || {}) .sort(([, a], [, b]) => b - a) .slice(0, 5); return (