diff --git a/src/components/moderation-pane/ModerationPane.tsx b/src/components/moderation-pane/ModerationPane.tsx index c2665941..2255b05c 100644 --- a/src/components/moderation-pane/ModerationPane.tsx +++ b/src/components/moderation-pane/ModerationPane.tsx @@ -68,6 +68,9 @@ const [stats, setStats] = createSignal(null); export const [selectedUsers, setSelectedUsers] = createSignal([]); const [selectedServers, setSelectedServers] = createSignal([]); +const [onlineUsersCount, setOnlineUsersCount] = createSignal< + number | undefined +>(); const isServerSelected = (id: string) => selectedServers().find((s) => s.id === id); @@ -388,6 +391,10 @@ function OnlineUsersPane() { const [users, { mutate: setUsers }] = createResource(getOnlineUsers); + createEffect(() => { + setOnlineUsersCount(users()?.length || undefined); + }); + const [showAll, setShowAll] = createSignal(false); const firstFive = () => users()?.slice(0, 5); @@ -725,6 +732,10 @@ function StatsArea() { title="Registered Users" description={stats()?.totalRegisteredUsers?.toLocaleString()} /> +