diff --git a/src/shared/components/search.tsx b/src/shared/components/search.tsx index 0bda38e1..0dd47487 100644 --- a/src/shared/components/search.tsx +++ b/src/shared/components/search.tsx @@ -314,22 +314,7 @@ export class Search extends Component {
{this.communityListing(i.data as Community)}
)} {i.type_ == 'users' && ( -
- - @ - - - {` - ${i18n.t('number_of_comments', { - count: (i.data as UserView).number_of_comments, - })}`} -
+
{this.userListing(i.data as UserView)}
)} @@ -368,7 +353,6 @@ export class Search extends Component { ); } - // Todo possibly create UserListing and CommunityListing communities() { return ( <> @@ -396,25 +380,23 @@ export class Search extends Component { ); } + userListing(user: UserView) { + return [ + + + , + {` - ${i18n.t('number_of_comments', { + count: user.number_of_comments, + })}`}, + ]; + } + users() { return ( <> {this.state.searchResponse.users.map(user => (
-
- - @ - - - {` - ${i18n.t('number_of_comments', { - count: user.number_of_comments, - })}`} -
+
{this.userListing(user)}
))}