mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21:32 +00:00
Adding number of comments for user search.
This commit is contained in:
parent
f3119b5b3a
commit
f3dbfcd37b
2 changed files with 9 additions and 1 deletions
8
ui/src/components/search.tsx
vendored
8
ui/src/components/search.tsx
vendored
|
@ -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>
|
||||
))}
|
||||
|
|
2
ui/src/components/user-listing.tsx
vendored
2
ui/src/components/user-listing.tsx
vendored
|
@ -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_} />}
|
||||
|
|
Loading…
Reference in a new issue