import Link from "next/link"; import { Megaphone, Pin } from "lucide-react"; import type { AnnouncementSummary } from "@/lib/api"; import { formatShortDate } from "@/lib/format"; import { getPublicSettingsCached } from "@/lib/serverData"; import { announcementPath } from "@/lib/urlStyle"; /** 近期公告目录(高亮当前 id) */ export default async function SiteDocAnnoNav({ items, currentId, showAllLink = true, }: { items: AnnouncementSummary[]; currentId?: number; showAllLink?: boolean; }) { const urlStyle = (await getPublicSettingsCached()).url_style; return (

近期公告

{showAllLink ? ( 全部 ) : null}
{items.length === 0 ? (

暂无公告

) : ( )}
); }