import Link from "next/link"; import { Flame, Users, MessageCircle, Heart } from "lucide-react"; import type { PostListItem, ActiveUser } from "@/lib/api"; import Avatar from "@/components/Avatar"; /* ---------- 热门榜 ---------- */ function HotRanking({ posts }: { posts: PostListItem[] }) { return (

热门讨论

{posts.length === 0 ? (

还没有热门讨论

) : (
    {posts.map((p, i) => (
  1. {i + 1} {p.title} {p.comment_count} {p.like_count} {p.board.name}
  2. ))}
)}
); } /* ---------- 活跃用户 ---------- */ function ActiveUsers({ users }: { users: ActiveUser[] }) { return (

活跃成员

{users.length === 0 ? (

近 14 天还没有人互动

) : ( )}

按近 14 天发帖与评论计数

); } /* ---------- 桌面 / 移动两种装配 ---------- */ export function CommunityPanels({ hot, activeUsers, }: { hot: PostListItem[]; activeUsers: ActiveUser[]; }) { return ( ); } export function CommunityPanelsMobile({ hot, activeUsers, }: { hot: PostListItem[]; activeUsers: ActiveUser[]; }) { return (
); }