From b6b5119e0f8771cc9ab62b0c84da96017298271e Mon Sep 17 00:00:00 2001 From: kongkx Date: Thu, 10 Sep 2026 19:40:11 +0800 Subject: [PATCH] fix(comment): refresh moderated report detail --- src/routes/_authed/comment-reports.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/_authed/comment-reports.tsx b/src/routes/_authed/comment-reports.tsx index 9eb511d..fc059d9 100644 --- a/src/routes/_authed/comment-reports.tsx +++ b/src/routes/_authed/comment-reports.tsx @@ -40,7 +40,8 @@ function ReportedCommentsPage() { const act = async (row: ReportedComment, action: ModerationAction, done: string) => { try { - await moderateReportedComment(row.id, action) + const response = await moderateReportedComment(row.id, action) + setDetail((current) => (current?.id === row.id ? response.data : current)) toast.success(done) void list.query.refetch() } catch (error) {