]> Untitled Git - lemmy-ui.git/commitdiff
fix: Add total users in site sidebar
authorJay Sitter <jay@jaysitter.com>
Sat, 17 Jun 2023 01:44:45 +0000 (21:44 -0400)
committerJay Sitter <jay@jaysitter.com>
Sat, 17 Jun 2023 01:44:45 +0000 (21:44 -0400)
src/shared/components/common/badges.tsx

index 56390342a6043e93a52db803ff38d7148d1f39b0..858b986487189dc060c4a51ebae239820f4cb3a7 100644 (file)
@@ -79,6 +79,22 @@ export const Badges = ({ counts, community_view }: BadgesProps) => {
         })}{" "}
         / {i18n.t("number_of_months", { count: 6, formattedCount: 6 })}
       </li>
+      {isSiteAggregates(counts) && (
+        <>
+          <li className="list-inline-item badge badge-secondary">
+            {i18n.t("number_of_users", {
+              count: Number(counts.users),
+              formattedCount: numToSI(counts.users),
+            })}
+          </li>
+          <li className="list-inline-item badge badge-secondary">
+            {i18n.t("number_of_communities", {
+              count: Number(counts.communities),
+              formattedCount: numToSI(counts.communities),
+            })}
+          </li>
+        </>
+      )}
       {isCommunityAggregates(counts) && (
         <li className="list-inline-item badge badge-secondary">
           {i18n.t("number_of_subscribers", {
@@ -87,14 +103,6 @@ export const Badges = ({ counts, community_view }: BadgesProps) => {
           })}
         </li>
       )}
-      {isSiteAggregates(counts) && (
-        <li className="list-inline-item badge badge-secondary">
-          {i18n.t("number_of_communities", {
-            count: Number(counts.communities),
-            formattedCount: numToSI(counts.communities),
-          })}
-        </li>
-      )}
       <li className="list-inline-item badge badge-secondary">
         {i18n.t("number_of_posts", {
           count: Number(counts.posts),