import { requireCloudViewer } from "../../cloud-auth"; import { DashboardShell, PageHeading, StatusPill, formatDate, } from "../../components/Shells"; import { getOrCreateAccount, listAccountFeedback, type FeedbackCategory, } from "@/db/repository"; import { FeedbackForm } from "./FeedbackForm"; export const dynamic = "force-dynamic"; const categoryLabels: Record = { connection_issue: "连接或接入", bug: "功能异常", suggestion: "使用建议", other: "其他", }; export default async function FeedbackPage() { const viewer = await requireCloudViewer("/dashboard/feedback"); const account = await getOrCreateAccount(viewer); const feedback = await listAccountFeedback(account.id); return (
新反馈

描述你卡住的地方

处理记录

我的反馈

{feedback.length} 条
{feedback.length ? (
{feedback.map((item) => (
{item.status === "resolved" ? "已回复" : "待处理"} {categoryLabels[item.category]}

{item.message}

{item.admin_response && (
后台回复

{item.admin_response}

)}
))}
) : (
还没有反馈记录。
)}
); }