]> Untitled Git - lemmy.git/commitdiff
Adding number of comments for user search.
authorDessalines <tyhou13@gmx.com>
Sat, 11 Jul 2020 23:25:17 +0000 (19:25 -0400)
committerDessalines <tyhou13@gmx.com>
Sat, 11 Jul 2020 23:25:17 +0000 (19:25 -0400)
ui/src/components/search.tsx
ui/src/components/user-listing.tsx

index c4cb974545c1ae89a8123645f62917119627b5dd..b2e5549792a8765f2dff69b34960b552799b4d1a 100644 (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>
         ))}
index 76196d47d5608b920315b250828d970971ac9a24..58475d3e94127996cdc516d898745cf6b5e4ccec 100644 (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_} />}