From f76248c997c1153a9f859511a6678ada18dd0af9 Mon Sep 17 00:00:00 2001 From: Rithvik Nishad Date: Fri, 26 Jul 2024 13:30:16 +0530 Subject: [PATCH] Fixes last active filter badge showing up when filters other than the last active filter is applied (#8215) --- src/Components/Users/ManageUsers.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Components/Users/ManageUsers.tsx b/src/Components/Users/ManageUsers.tsx index 9660f13c269..19bafebd115 100644 --- a/src/Components/Users/ManageUsers.tsx +++ b/src/Components/Users/ManageUsers.tsx @@ -561,9 +561,11 @@ export default function ManageUsers() { value( "Last Active", "last_active_days", - qParams.last_active_days === "never" - ? "Never" - : `in the last ${qParams.last_active_days} day${qParams.last_active_days > 1 ? "s" : ""}`, + (() => { + if (!qParams.last_active_days) return ""; + if (qParams.last_active_days === "never") return "Never"; + return `in the last ${qParams.last_active_days} day${qParams.last_active_days > 1 ? "s" : ""}`; + })(), ), ]} />