import Link from 'next/link' import { getTranslations } from 'next-intl/server' import { GitHubTextStatsCard } from './GitHubTextStatsCard' import { getGitHubInfoFromLinks } from '@/lib/github/badges' interface ProjectSidebarProps { project: { id: string name: string nameEn?: string | null slug: string links: Array<{ id: string type: string url: string title?: string | null }> } locale: string } // Helper function to get icon for link type function getLinkIcon(type: string): string { switch (type.toUpperCase()) { case 'WEBSITE': return 'language' case 'GITHUB': return 'code' case 'HUGGINGFACE': return 'model_training' case 'PAPER': return 'description' default: return 'link' } } export async function ProjectSidebar({ project, locale }: ProjectSidebarProps) { const t = await getTranslations('project') const displayName = locale === 'en' && project.nameEn ? project.nameEn : project.name // 获取 GitHub 统计数据 const githubInfo = getGitHubInfoFromLinks(project.links) return ( ) }