import Link from 'next/link'; import { Flame } from 'lucide-react'; export interface ActiveGroup { chatroom_id: string; name: string; summary: string; total: number; top_senders: Array<{ sender: string; count: number }>; } export default function ActiveGroupsList({ groups }: { groups: ActiveGroup[] }) { const max = groups[0]?.total ?? 1; return (
智能活跃群
去噪后 {groups.length} 个 · 综合排序
{groups.length === 0 ? (
暂无数据 · 点击「重扫」加载
) : (
{groups.slice(0, 12).map((g, i) => ( ))}
)}
); } function Row({ group, rank, max }: { group: ActiveGroup; rank: number; max: number }) { const initial = group.name.slice(0, 2); const senders = group.top_senders .slice(0, 3) .map((s) => s.sender) .join(' · '); const pct = (group.total / max) * 100; return ( {rank}
{initial}
{group.name}
{senders && (
{senders}
)}
{group.total.toLocaleString()}
); }