refactor(disputes): align type with backend and derive timeline in page

This commit is contained in:
zetaloop
2026-05-03 05:48:39 +08:00
parent be329865b3
commit 7acde68d45
3 changed files with 20 additions and 69 deletions
+1 -9
View File
@@ -44,15 +44,7 @@ const disputeStatusVariants: Record<string, StatusBadgeProps["status"]> = {
appealed: "info",
}
function deriveMinimalTimeline<TCreatedAt>(dispute: {
id: string
status: string
createdAt: TCreatedAt
timeline?: { id: string; content: string; createdAt: TCreatedAt }[]
}) {
const existing = dispute.timeline
if (existing?.length) return existing
function deriveMinimalTimeline(dispute: { id: string; status: string; createdAt: string }) {
const steps = [
{ status: "open", content: "争议已提交" },
{ status: "reviewing", content: "平台审核中" },