Adding number of comments for user search.

This commit is contained in:
Dessalines 2020-07-11 19:25:17 -04:00
parent f3119b5b3a
commit f3dbfcd37b
2 changed files with 9 additions and 1 deletions

View file

@ -275,6 +275,7 @@ export class Search extends Component<any, SearchState> {
{i.type_ == 'users' && (
<div>
<span>
@
<UserListing
user={{
name: (i.data as UserView).name,
@ -282,6 +283,9 @@ export class Search extends Component<any, SearchState> {
}}
/>
</span>
<span>{` - ${i18n.t('number_of_comments', {
count: (i.data as UserView).number_of_comments,
})}`}</span>
</div>
)}
</div>
@ -356,6 +360,7 @@ export class Search extends Component<any, SearchState> {
<div class="row">
<div class="col-12">
<span>
@
<UserListing
user={{
name: user.name,
@ -363,6 +368,9 @@ export class Search extends Component<any, SearchState> {
}}
/>
</span>
<span>{` - ${i18n.t('number_of_comments', {
count: user.number_of_comments,
})}`}</span>
</div>
</div>
))}

View file

@ -52,7 +52,7 @@ export class UserListing extends Component<UserListingProps, any> {
class="rounded-circle mr-2"
/>
)}
<span>{`/u/${name_}`}</span>
<span>{name_}</span>
</Link>
{isCakeDay(user.published) && <CakeDay creatorName={name_} />}