refactor(disputes): align type with backend and derive timeline in page
This commit is contained in:
@@ -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: "平台审核中" },
|
||||
|
||||
Reference in New Issue
Block a user