import React from 'react'; import { Button } from '~/components/ui/Button'; import type { GitLabStats } from '~/types/GitLab'; interface StatsDisplayProps { stats: GitLabStats; onRefresh?: () => void; isRefreshing?: boolean; } export function StatsDisplay({ stats, onRefresh, isRefreshing }: StatsDisplayProps) { return (
{/* Repository Stats */}
Repository Stats
{[ { label: 'Public Repos', value: stats.publicProjects, }, { label: 'Private Repos', value: stats.privateProjects, }, ].map((stat, index) => (
{stat.label} {stat.value}
))}
{/* Contribution Stats */}
Contribution Stats
{[ { label: 'Stars', value: stats.stars || 0, icon: 'i-ph:star', iconColor: 'text-bolt-elements-icon-warning', }, { label: 'Forks', value: stats.forks || 0, icon: 'i-ph:git-fork', iconColor: 'text-bolt-elements-icon-info', }, { label: 'Followers', value: stats.followers || 0, icon: 'i-ph:users', iconColor: 'text-bolt-elements-icon-success', }, ].map((stat, index) => (
{stat.label}
{stat.value}
))}
Last updated: {new Date(stats.lastUpdated).toLocaleString()} {onRefresh && ( )}
); }