summaryrefslogtreecommitdiffstats
path: root/ui/src/components/search.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-12-29 15:39:48 -0500
committerDessalines <tyhou13@gmx.com>2019-12-29 15:39:48 -0500
commita4428528e30b18eb85596edf9c26bc8b6b7d11ee (patch)
tree450f5662ada20a7f66f809033d57fbc12dcc963d /ui/src/components/search.tsx
parent106aaf4f28ef34d68848f48e5673f955a04b6deb (diff)
Adding user avatars / icons. Requires pictshare.
- Fixes #188
Diffstat (limited to 'ui/src/components/search.tsx')
-rw-r--r--ui/src/components/search.tsx15
1 files changed, 14 insertions, 1 deletions
diff --git a/ui/src/components/search.tsx b/ui/src/components/search.tsx
index bba7c5ad..d92c06e1 100644
--- a/ui/src/components/search.tsx
+++ b/ui/src/components/search.tsx
@@ -19,6 +19,7 @@ import {
fetchLimit,
routeSearchTypeToEnum,
routeSortTypeToEnum,
+ pictshareAvatarThumbnail,
} from '../utils';
import { PostListing } from './post-listing';
import { SortSelect } from './sort-select';
@@ -286,7 +287,19 @@ export class Search extends Component<any, SearchState> {
<Link
className="text-info"
to={`/u/${(i.data as UserView).name}`}
- >{`/u/${(i.data as UserView).name}`}</Link>
+ >
+ {(i.data as UserView).avatar && (
+ <img
+ height="32"
+ width="32"
+ src={pictshareAvatarThumbnail(
+ (i.data as UserView).avatar
+ )}
+ class="rounded-circle mr-1"
+ />
+ )}
+ <span>{`/u/${(i.data as UserView).name}`}</span>
+ </Link>
</span>
<span>{` - ${
(i.data as UserView).comment_score