fix: Add total users in site sidebar

This commit is contained in:
Jay Sitter 2023-06-16 21:44:45 -04:00
parent fe64edd2fc
commit f7f8ddcd7c

View file

@ -79,6 +79,22 @@ export const Badges = ({ counts, community_view }: BadgesProps) => {
})}{" "} })}{" "}
/ {i18n.t("number_of_months", { count: 6, formattedCount: 6 })} / {i18n.t("number_of_months", { count: 6, formattedCount: 6 })}
</li> </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) && ( {isCommunityAggregates(counts) && (
<li className="list-inline-item badge badge-secondary"> <li className="list-inline-item badge badge-secondary">
{i18n.t("number_of_subscribers", { {i18n.t("number_of_subscribers", {
@ -87,14 +103,6 @@ export const Badges = ({ counts, community_view }: BadgesProps) => {
})} })}
</li> </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"> <li className="list-inline-item badge badge-secondary">
{i18n.t("number_of_posts", { {i18n.t("number_of_posts", {
count: Number(counts.posts), count: Number(counts.posts),