Browse Source

Showing community count on main sidebar

- Fixes #232
unoptim
Dessalines 3 years ago
parent
commit
e7519149cd
  1. 4
      src/components/main.tsx
  2. 1
      src/interfaces.ts
  3. 1
      src/translations/en.ts

4
src/components/main.tsx

@ -39,6 +39,7 @@ export class Main extends Component<any, MainState> {
number_of_users: null,
number_of_posts: null,
number_of_comments: null,
number_of_communities: null,
},
admins: [],
banned: [],
@ -217,6 +218,9 @@ export class Main extends Component<any, MainState> {
<li className="list-inline-item badge badge-secondary">
<T i18nKey="number_of_users" interpolation={{count: this.state.site.site.number_of_users}}>#</T>
</li>
<li className="list-inline-item badge badge-secondary">
<T i18nKey="number_of_communities" interpolation={{count: this.state.site.site.number_of_communities}}>#</T>
</li>
<li className="list-inline-item badge badge-secondary">
<T i18nKey="number_of_posts" interpolation={{count: this.state.site.site.number_of_posts}}>#</T>
</li>

1
src/interfaces.ts

@ -135,6 +135,7 @@ export interface Site {
number_of_users: number;
number_of_posts: number;
number_of_comments: number;
number_of_communities: number;
}
export interface FollowCommunityForm {

1
src/translations/en.ts

@ -21,6 +21,7 @@ export const en = {
subscribed_to_communities:'Subscribed to <1>communities</1>',
trending_communities:'Trending <1>communities</1>',
list_of_communities: 'List of communities',
number_of_communities:'{{count}} Communities',
community_reqs: 'lowercase, underscores, and no spaces.',
edit: 'edit',
reply: 'reply',

Loading…
Cancel
Save