From cb33e84b4382b0082568987f7a6e1ad1e2f61088 Mon Sep 17 00:00:00 2001 From: GreenAsJade Date: Thu, 25 Jul 2024 21:01:45 +0930 Subject: [PATCH] filter the `UserHistory` table for warnings only for CMs (clutter reduction) --- src/views/ReportsCenter/UserHistory.tsx | 4 +++- src/views/User/ModLog.tsx | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/ReportsCenter/UserHistory.tsx b/src/views/ReportsCenter/UserHistory.tsx index 6a0dd92472..bd58c3a5f3 100644 --- a/src/views/ReportsCenter/UserHistory.tsx +++ b/src/views/ReportsCenter/UserHistory.tsx @@ -41,7 +41,9 @@ export function UserHistory({ {user.is_moderator && ( )} - {!user.is_moderator && !!user.moderator_powers && } + {!user.is_moderator && !!user.moderator_powers && ( + + )} ); } diff --git a/src/views/User/ModLog.tsx b/src/views/User/ModLog.tsx index d108c1134d..57a0fc5c3f 100644 --- a/src/views/User/ModLog.tsx +++ b/src/views/User/ModLog.tsx @@ -24,9 +24,12 @@ import { chat_markup } from "Chat"; interface ModLogProps { user_id: number; + warnings_only?: boolean; } export function ModLog(props: ModLogProps): JSX.Element { + const groomFunction = (data: any[]) => data.filter((X) => !X.action.includes("ack")); + return (