fix(comment): refresh moderated report detail
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user