From f3dbfcd37b84f58b42dfdbeec14334ba5af8e379 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 11 Jul 2020 19:25:17 -0400 Subject: [PATCH] Adding number of comments for user search. --- ui/src/components/search.tsx | 8 ++++++++ ui/src/components/user-listing.tsx | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/src/components/search.tsx b/ui/src/components/search.tsx index c4cb9745..b2e55497 100644 --- a/ui/src/components/search.tsx +++ b/ui/src/components/search.tsx @@ -275,6 +275,7 @@ export class Search extends Component { {i.type_ == 'users' && (
+ @ { }} /> + {` - ${i18n.t('number_of_comments', { + count: (i.data as UserView).number_of_comments, + })}`}
)} @@ -356,6 +360,7 @@ export class Search extends Component {
+ @ { }} /> + {` - ${i18n.t('number_of_comments', { + count: user.number_of_comments, + })}`}
))} diff --git a/ui/src/components/user-listing.tsx b/ui/src/components/user-listing.tsx index 76196d47..58475d3e 100644 --- a/ui/src/components/user-listing.tsx +++ b/ui/src/components/user-listing.tsx @@ -52,7 +52,7 @@ export class UserListing extends Component { class="rounded-circle mr-2" /> )} - {`/u/${name_}`} + {name_} {isCakeDay(user.published) && } -- 2.44.1