Adding number of comments for user search.

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

View File

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