import Link from "next/link"; import { Badge } from "@/components/ui/badge"; import { Card } from "@/components/ui/card"; import type { ChangelogVersion } from "@/lib/changelog/parse-changelog"; /** Converte "[texto](url)" em link; texto simples fica como está */ function parseContributorLine(content: string) { const linkMatch = content.match(/^\[([^\]]+)\]\((https?:\/\/[^)]+)\)$/); if (linkMatch) { return { label: linkMatch[1], url: linkMatch[2] }; } return { label: content, url: null }; } const sectionBadgeVariant: Record< string, "success" | "info" | "destructive" | "secondary" > = { Adicionado: "success", Alterado: "info", Corrigido: "destructive", Removido: "secondary", }; function getSectionVariant(type: string) { return sectionBadgeVariant[type] ?? "secondary"; } export function ChangelogTab({ versions }: { versions: ChangelogVersion[] }) { return (