mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-21 22:27:11 +00:00
Add badge for local subscribers to communities (#2377)
* Add badge for local subscribers to communities * Add local subscribers badge --------- Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
This commit is contained in:
parent
eb5095b686
commit
79ed590335
|
@ -1 +1 @@
|
|||
Subproject commit 6c03b403c79bc5a893527d1fe217690db774a7ef
|
||||
Subproject commit b4cb42fbdd63dece5de2abf7f33249e489166501
|
|
@ -112,12 +112,20 @@ export const Badges = ({ counts, communityId }: BadgesProps) => {
|
|||
</>
|
||||
)}
|
||||
{isCommunityAggregates(counts) && (
|
||||
<li className="list-inline-item badge text-bg-secondary">
|
||||
{I18NextService.i18n.t("number_of_subscribers", {
|
||||
count: Number(counts.subscribers),
|
||||
formattedCount: numToSI(counts.subscribers),
|
||||
})}
|
||||
</li>
|
||||
<>
|
||||
<li className="list-inline-item badge text-bg-secondary">
|
||||
{I18NextService.i18n.t("number_of_local_subscribers", {
|
||||
count: Number(counts.subscribers_local),
|
||||
formattedCount: numToSI(counts.subscribers_local),
|
||||
})}
|
||||
</li>
|
||||
<li className="list-inline-item badge text-bg-secondary">
|
||||
{I18NextService.i18n.t("number_of_subscribers", {
|
||||
count: Number(counts.subscribers),
|
||||
formattedCount: numToSI(counts.subscribers),
|
||||
})}
|
||||
</li>
|
||||
</>
|
||||
)}
|
||||
<li className="list-inline-item badge text-bg-secondary">
|
||||
{I18NextService.i18n.t("number_of_posts", {
|
||||
|
|
|
@ -61,6 +61,7 @@ function getListingTypeFromQuery(listingType?: string): ListingType {
|
|||
function getSortTypeFromQuery(type?: string): SortType {
|
||||
return type ? (type as SortType) : "TopMonth";
|
||||
}
|
||||
|
||||
function getCommunitiesQueryParams() {
|
||||
return getQueryParams<CommunitiesProps>({
|
||||
listingType: getListingTypeFromQuery,
|
||||
|
|
Loading…
Reference in a new issue