- 新增审计报告 docs/architecture/audit/announcements-messages-audit-report.md - 新增中英双语 i18n 字典 announcements.json / messages.json(11/13 个命名空间) - 重构所有 announcements 和 messaging 组件接入 next-intl(useTranslations) - 所有页面 page.tsx 使用 generateMetadata + getTranslations 替代硬编码 metadata - 新增 7 个 error.tsx 错误边界(4 公告 + 3 消息),统一 EmptyState + i18n + 重试 - a11y 改进:announcement-card / message-list / notification-dropdown 添加 aria-label - 同步架构图 004 和 005:i18n.messages 清单 + 已知问题修复记录
25 lines
719 B
TypeScript
25 lines
719 B
TypeScript
"use client"
|
|
|
|
import { AlertCircle } from "lucide-react"
|
|
import { useTranslations } from "next-intl"
|
|
|
|
import { EmptyState } from "@/shared/components/ui/empty-state"
|
|
|
|
export default function MessagesError({ reset }: { error: Error & { digest?: string }; reset: () => void }) {
|
|
const t = useTranslations("messages")
|
|
return (
|
|
<div className="flex h-full flex-col items-center justify-center space-y-4 p-8">
|
|
<EmptyState
|
|
icon={AlertCircle}
|
|
title={t("error.loadFailed")}
|
|
description={t("error.loadFailedDesc")}
|
|
action={{
|
|
label: t("error.retry"),
|
|
onClick: () => reset(),
|
|
}}
|
|
className="border-none shadow-none h-auto"
|
|
/>
|
|
</div>
|
|
)
|
|
}
|